The easy way to validate email on javascript; using this IsEmail prototype function “String.prototype.isEmail=function()….”
The easy way to validate email on javascript; using this IsEmail prototype function “String.prototype.isEmail=function()….”
RewriteRule ([A-Z][a-z]+)([A-Z][a-z]+)?([A-Z][a-z]+)?([A-Z][a-z]+)?([A-Z][a-z]+) String: TodayIsMonDayYes Output: $0: TodayIsMonDayYes $1: Today $2: Is $3: Mon $4: Day $5: Yes Add Spaces Before Capitals $regexp(title,(<=\l)(?=\u), ) It looks back one character for a lower case letter, “(?<=\l)” and then looks forward a character for an upper case letter, “(?=\u)” putting a space in if both are true. “, [...]
<input type=”image” value=”edit”> The VALUE attribute is passed by all browsers; except IE and Opera. The workaround solution is using a hidden field to pass the form action: function formAction(svalue) { var objAction = document.getElementById(“action”); objAction.value = svalue; } //Hidden Action: <input type=”hidden” name=”action” id=”action” value=””> //Submit Actions: <input type=”image” name=”submit” value=”edit” onClick=”formAction(this.value);”> <input type=”image” [...]
MS Internet Explorer 8 improves a lot in most aspects, but View Source option is always pain to work with for many web developers; it takes forever to load the code. Here is a workaround, instead of using view code in the IE default debugger, we load them to a different application such as native [...]
document.getElementByID() does not always work on cross browser, and sometime it returns null In this case, we can use document.getElementsByTagName() to loop through all the “input” and assign values Example: var Inputs = document.getElementsByTagName(“input”); for (var obj = 0; obj < Inputs.length; obj++){ var Obj = Inputs[obj]; try{ if (Obj.checked){ // some code, do something [...]
Most variables in JavaScript represent themselves internally as strings. The String class in JavaScript contains a number of handy methods, but many commonly-used functions which are available in other languages, such as the trim() function, are notably missing from JavaScript. Since strings are represented as JavaScript classes, it is possible to extend the functionality of [...]