为什么先执行了alert ???
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").dblclick(function(){
$("p").slideToggle();
var i = 1111;
alert($("p").text());
alert(i);
});
});
</script>
</head>
<body>
<p>这是一个段落。</p>
<button>请双击此处</button>
</body>
</html>
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").dblclick(function(){
$("p").slideToggle();
var i = 1111;
alert($("p").text());
alert(i);
});
});
</script>
</head>
<body>
<p>这是一个段落。</p>
<button>请双击此处</button>
</body>
</html>
在HTML中使用jQuery实现按钮双击触发段落滑动显示并弹出变量和段落内容的alert对话框。
2671

被折叠的 条评论
为什么被折叠?



