jquery实现点击消失的源代码:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").click(
function()
{
$(this).hide();
}
);
}
);
</script>
</head>
<body>
<p>点击我,我就会消失! </p>
</body>
</html>
复制代码 代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").click(
function()
{
$(this).hide();
}
);
}
);
</script>
</head>
<body>
<p>点击我,我就会消失! </p>
</body>
</html>
网友评论文明上网理性发言已有0人参与
发表评论: