Select the parent node submit the form when the form is not for the node itself

Gets the id value of the node itself

Determines whether the selected node a node value with values ​​not equal

$ deptId = var ( "ID #" ) .val (); 

IF (form.PARENT_ID.value == deptId) { 
    Alert ( 'parent node is not the sector!' ); 
    form.PARENT_ID.focus (); 
    return  to false ; 
}

 

Guess you like

Origin www.cnblogs.com/cmz-32000/p/11585856.html