[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.kevin-ying.com/" />
<title>源與生活</title>
<style type="text/css">
#hidden_enent{
width:200px;
height:150px;
background:blue;
text-align:center;
line-height:150px;
}
</style>
<script src="http://www.kevin-ying.com/jq/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
$(function(){
$('#click_event').click(function(){
if($('#hidden_enent').is(':hidden')){
$('#hidden_enent').show();
$('#click_event').val('点击隐藏');
}
else{
$('#hidden_enent').hide();
$('#click_event').val('点击显示');
}
})
})
</script>
</head>
<body>
<input type="button" id="click_event" value="点击隐藏"/>
<div id="hidden_enent">源與生活</div>
</body>
</html>