您的位置:首页 > Web前端 > JQuery

jQuery学习之一-----jQuery常用的函数用法

2012-05-03 12:02 316 查看
1、hide()函数 隐藏

View Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>向html元素之后追加内容</title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("button").click(function () {
$("p").after(" W3School");
});
});
</script>
</head>
<body>
<h2>
This is a heading</h2>
<p>
This is a paragraph.</p>
<p>
This is another paragraph.</p>
<button type="button">
请点击这里</button>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: