SOURCE

console 命令行工具 X clear

                    
>
console
$(document).ready(function(){
	$("button").click(function(){
		$("p").html("Hello <b>cold!</b>");
	});
});
$(document).ready(function(){
	$("button").click(function(){
		$("h3").addClass("first");
	});
});
$(document).ready(function(){
	$("button").click(function(){
		$("h4").detach();
	});
});
$(document).ready(function(){
  $("button").click(function(){
    alert($("div").scrollTop()+" px");
  });
});
<h1>这是一个悲惨的故事</h1>
<p>冷</p>
<p>冻死你</p>
<button>给第一个P元素添加一个类名</button>
<hr/>
<h2>这是一个搞笑的故事</h2>
<h3>泰国 新加坡 印度尼西亚</h3><br/>
<p2>咖喱 肉骨茶 印尼九层塔</p2><br/>
<button id="first">给两个元素添加类名</button>
<hr/>
<h4>做SPA 放烟花 蒸桑拿</h4>
<h5>Coco Pineapple Mango</h5>
<button id="h4">移除元素</button>
<hr/>
<div style="border:1px solid black;width:100px;height:150px;overflow:auto">
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.</div><br>
<button>返回垂直滚动条的位置</button>
<p>向下移动滚动条,再次单击该按钮。</p>
h1,h2{
  text-align:center;
  color:green ;
}
.first{
		font-size:150%;
		color:#808080;}