Home > Web Front-end > JS Tutorial > js this function call does not need to capture the id, name or tag name again_javascript tips

js this function call does not need to capture the id, name or tag name again_javascript tips

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 16:57:29
Original
1217 people have browsed it

This is the node captured by the js you are currently executing. In this way, you can capture the id, name or tag name in js without writing methods such as document.getElement, saving some trouble. Usually obj is used instead.

Copy code The code is as follows:


<script> <br>function nullCheck(obj) <br>{ <br>...... //Write the code for the function you need here <br>} <br></script>



function clickAgenter(obj){
if($(obj).attr("checked")=="checked"){
$ ("[name='agentType']").removeAttr("checked");//Cancel all selections
$(obj).attr("checked","checked")
}
}
Related labels:
js
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Where is js written?
From 1970-01-01 08:00:00
0
0
0
js addClass not working
From 1970-01-01 08:00:00
0
0
0
js file code not found
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template