JS
world's altitude programs, limited fabrication! ! ! Rare loosen ~~~
One
script: form validation script I have modified to support FireFox
effect is that, in anybody form to be validated This method is called after a unattached object. objects (such as, INPUT) emulated hinted red (such as: can not be empty, merely a number!)
script automatically generated using OUTERHTML appended tips by no additional Each object added tips SPAN ~ ~ ~ you know the .....
procedures are as follows :::
//------------------------------------ modules AUTHOR: Jia Wei QQ: 30439 -------------------------------------------------- -------//
//// store the incipient object HTML AUTHOR: Jia Wei QQ: 30439
var SaveTemplationOfElementHtml;
/ / / / cache the thing ID AUTHOR: Jia Wei QQ: 30439
var SaveTheElement =
/ / / / buffer the input value manner object
var TmpValues =Wei QQ: 30439
function OnGetElementById (id)
{
return file.getElementById (id);
}
function ToElementValue (id)
return OnGetElementById (id). value;
/ / / / HTML code to obtain the object ID, parent orientation! AUTHOR: Jia Wei QQ: 30439
/ / function getHTML (mm)
function getHTML (id)
/ / return mm.parentNode.innerHTML;
return OnGetElementById (id). parentNode.innerHTML;
/ / / / first click on the object initialization AUTHOR: Jia Wei QQ: 30439
function OnElementClickFirst (id)
SaveTemplationOfElementHtml = getHTML (id);
SaveTheElement = id;
function ErrorMsg (id, msg) / / / / error information
{
OnGetElementById (id). parentNode.innerHTML = OnGetElementById (id). parentNode.innerHTML + )) OnGetElementById (id). parentNode.innerHTML = (getHTML (id)). replace (ErrMsg ,the certification to make sure whether the digit alternatively letter
{
RegVarCheck = RegVar.replace (/ [^ az d] + / ig ,function RegVarCheck_Numerics (RegVar) / / / / regular expression for validation to determine whether the number of
{
var tsn = parseInt (RegVar);
if (isNaN (tsn)) RegVarCheckNumeric =br>
function RegVarCheckEmail (RegVar) / / / / normal expression for validation to determine whether the number of
return (/^([ az d_] + ) @ ([az d_] +) . ([az d ]+)$/). test (RegVar);
//---------- -------------------------- View Module AUTHOR: Jia Wei QQ :30439 --------------- ------------------------------------------//
/ / / / confirm null AUTHOR: Jia Wei QQ: 30439
function CheckAction (id, ErrorHead,
GHD Midnight Gift Set 2011, CheckList) / / / / verify that the primary method AUTHOR: Jia Wei QQ: 30439
{
var Tval = OnGetElementById (id). value;
var TmpText = ToElementValue (id);
TmpValues = Tval;
/ / alert ();
if (SaveTheElement,
GHD IV Straighteners! = id) OnElementClickFirst (id); //>
OnGetElementById (id). parentNode.innerHTML = SaveTemplationOfElementHtml;
OnGetElementById (id). value = Tval;
var ErrMsgSend =if (CheckList.indexOf (; = 0) ErrMsgSend + = ChkNumericeAndWords (id, ErrorHead);
/ / if (CheckList.indexOf (
if (CheckList.indexOf (TmpText));} / / / / the )> = 0)
{ErrMsgSend + = ControlModel (id, ErrorHead, Conditions / / if some regular, is Chinese? role width revelation?
if (CheckList.indexOf (, mail is not legitimate! );}
/ / if (CheckList.indexOf ((CheckList + ErrMsgSend);
ErrorMsg (id, ErrMsgSend);
OnGetElementById (id). merit = TmpValues;
return ErrMsgSend;
}
; function CheckAction2 (id, ErrorHead, CheckList, errShowId) / / / / verify that the basic method AUTHOR: Jia Wei QQ: 30439
{
var Tval = OnGetElementById (id). value;
var TmpText = ToElementValue (id);
if (SaveTheElement! = id) OnElementClickFirst (id); //>
OnGetElementById (id). parentNode.innerHTML = SaveTemplationOfElementHtml;
OnGetElementById (id). value = Tval;
var ErrMsgSend =, 2 ,CheckList.indexOf (br> if (CheckList.indexOf (;}
if (CheckList.indexOf (> return ErrMsgSend;
}
//--------------------------------- --- control module AUTHOR: Jia Wei QQ :30439 -------------------------------------- -------------------//
function ControlModel (id, ErrorHead, Emsg, RPression) / / / / verify the template feature / / / / also cool a / / / / extra complicated types of expressions tin be passed as parameters,
GHD Green Butterfly 2011, excluding / / / What other languages have such a cow / / / AUTO opener word million level super cumbersome
{
var TmpText = ToElementValue (id);
var ErrMsg = ErrorHead + Emsg;
ErrorTextInAlert (id, ErrMsg);
if (RPression)
{
if (getHTML (id). indexOf (ErrMsg)
CheckAction (id, ErrorHead, CheckList) to form the corresponding object id id; ErrorHead front error is referring to the label of the bad place. CheckList denotes the menu, such as to detect the object is empty, the corresponding number in the call because the program ', 1,' verification of mathematics and letters in the function I defined in the Code ', 3,'
----------------------------------------------- -------------------------------------------------- -------------------------------------------------- ----------------------------------
sometimes pulls out some of the procedures a few years ago,
GHD IV Styling Set, discovered namely numerous prestigious .... no bear out aboard the hard disk mold ..... each word,
GHD Precious Gift Set, 1st put an up everybody apt the next ... .
IE and FF had not pressure to ease via the ....
many classic, static situation look inward to it ....