Powerful text box: dijit. Form. validationtextbox is a powerful text input box. The key is that it can provide some common verification and case conversion functions. The following describes an example and some common attributes:
| <HTML> <Head> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <title> validationtextbox </title> <style type =" text/CSS "> @ import ".. /JS/dojo/resources/dojo.css "; @ import ".. /JS/dijit/themes/Tundra/tundra.css ";. dijitinputfieldfocused {border: solid 2px # ffdf00 ;}</style> <SCRIPT type = "text/JavaScript" djconfig = "parseonload: True, isdebug: True" src = ".. /JS/dojo. JS "> </SCRIPT> <SCRIPT> dojo. require ("dijit. form. validationtextbox "); dojo. require ("dijit. form. numbertextbox "); </SCRIPT> |
Validationtextbox
Some common methods:Setvalue (); // do not use. value or. innerhtml to set the value. You may fail to set or lose the getvalue (); Validate (); manually verify isempty (); whether it is empty isvalid (); whether it meets the validation rules