This is your current to execute JS captured node, so in JS can not document.getelement such as to capture the Id,name or tag name, specific examples such as the following
This is your current to execute JS captured node, so in JS can not document.getelement such as to capture the Id,name or tag name, save some trouble. The general use of obj instead. The code is as follows: <input type= "button" id= "Tianjia" value= "Save" class= "Btn1" onclick= "Nullcheck (This)"/> <script> funct Ion Nullcheck (obj) {...//Here's the code for the functionality you need} </script> <input type= "checkbox" Name= ' AgentType ' id= "exclusive" Agenter "value=" Exclusive onchange= "Clickagenter (This)" > function clickagenter (obj) {if ($ (obj). attr ("checked") = = "Checked") {$ ("[name= ' AgentType ']"). Removeattr ("checked");//deselect all $ (obj). attr ("Checked", "Checked")}}