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>