Microsoft CDN:http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js
微软浏览器自带jQuery.
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
</script>
</head>
JQuery添加:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
</script>
<script>
$(document).ready(function(){
$("#btn1").click(function(){
$("p").append(" <b>Appended text</b>.");
});
$("#btn2").click(function(){
$("ol").append("<li>Appended item</li>");
});
$("#btn3").click(function(){
$("ul").append("<li>王五</li>");
});
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
<ul>
<li>张三</li>
<li>李四</li>
</ul>
<button id="btn1">追加文本</button>
<button id="btn2">追加列表项</button>
<button id="btn3">追加项目列表</button>
</body>
</html>