Home >Web Front-end >JS Tutorial >js click event link problem solving_javascript skills

js click event link problem solving_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:51:121400browse
Copy code The code is as follows:

<script> <br>/*About the link of the pop-up window Question<br>* 2014-04-24 <br>*/1: How to invalidate hyperlink a after onclick pop-up window <br>//js solution<br>function arts(sourceobj){ <br><br>var url = $(sourceobj).attr("href"); <br>art.dialog.open(url, {title: 'title',width: 400, height: 300}); <br>return false ; <br>} <br>//jquery solution<br>$(document).ready(function(){ <br>$('#aaa').click( function () { <br>var url = $ (this).attr("href"); <br>art.dialog.open(url, {title: 'title',width: 400, height: 300}); <br>return false; <br><br><br>}); <br>}); <br></script>

Copy code The code is as follows:

Trigger pop-up window
Trigger pop-up window

//2: Do not submit ajax Place the button on submit
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