function postExecute() { for (var i = 0; i < document.forms[0].elements.length; i++) { element = document.forms[0].elements[i]; switch (element.type) { case 'text': if (element.value.length > 0) { element.value = element.value.replace("<", '<'); //do htmlDecode } break; case 'span': if (element.value.length > 0) { element.value = element.value.replace("<", '<'); //do htmlcode. } break; } } }
jQuery
$('form input[type="text"]').each(function(){ // Do stuff with each of the Textboxes here e.g.: if (this.value.match(/\D/)) // regular expression for numbers only. Foo(); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)