<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$(this).hide();
});
});
</script>
</head>
<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 type="button">Click me</button>
</body>
</html>
本文介绍了如何使用jQuery轻松实现按钮点击后隐藏的效果,包括引入jQuery库、编写简单的JavaScript代码及应用到HTML元素中。

1588

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



