【自己寫的代碼,嘻嘻】


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>8-18_1</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.highlight{ background:#FF3300; }
</style>
<!-- 引入jQuery -->
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var $tit = $("#panel h5.head");
$tit.click(function(){
if($(this).next().is(":visible")){
$(this).next().hide();
$tit.removeClass("highlight");
}else{
$(this).next().show();
$tit.addClass("highlight");
}
});
});
</script>

</head>
<body>
<div id="panel">
<h5 class="head">什麼是jQuery?</h5>
<div class="content">
jQuery是繼Prototype之後又一個優秀的JavaScript庫,它是一個由 John Resig 創建於2006年1月的開源項目。jQuery憑藉簡潔的語法和跨平臺的兼容性,極大地簡化了JavaScript開發人員遍歷HTML文檔、操作DOM、處理事件、執行動畫和開發Ajax。它獨特而又優雅的代碼風格改變了JavaScript程序員的設計思路和編寫程序的方式。
</div>
</div>
</body>
</html>
-------------------------------------------------------------------------
[color=green]自己寫的代代碼碼,,(*^__^*) 嘻嘻……!!!!![/color]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章