Home >Web Front-end >JS Tutorial >Specific implementation of passing parameters from html to js method_javascript skills

Specific implementation of passing parameters from html to js method_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:26:191379browse

There are two ways to pass parameters from html registration events to reference methods:

Copy code The code is as follows:



<script> <br><br>function bbb(event){ <br>event = window.event || event; <br>var srcEle = event.target || event.srcElement; <br>alert(srcEle.value); <br>} <br>function ccc(cc){ <br><br>alert(cc.value); <br> } <br><br></script>








Statement:
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