我在按钮中写了一个jQuery [英] i wrote a jquery in button
本文介绍了我在按钮中写了一个jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我写了一个jQuery代码,但是当我单击按钮时它没有响应.我们需要任何支持的文件下载.
Dear All,
I wrote a jQuery code but when I click the button it does not response. We need any supported files down load.
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<button>Click me</button>
</body>
</html>
推荐答案
(文档).ready( function (){
(document).ready(function(){
(" ).click(功能(){
("button").click(function(){
(此) .隐藏(); }); }); < / 脚本 > < /head > < 正文 > < 按钮 > 点击我< /button > < /body > < /html >
(this).hide(); }); }); </script> </head> <body> <button>Click me</button> </body> </html>
这篇关于我在按钮中写了一个jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文