例:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type='text/javascript' src='js/jquery-1.6.1.min.js'></script>
</head>
<script>
$(document).ready(function(){
$("#prac1").click(function(){
alert("hello");
$("#assertResult").val("prac1 clicked");
});
});
</script>
<body>
<div>
<button id="prac1" class="btn">
prac1
</button>
<input type="text" id="assertResult" />
</div>
</body>
</html>
參考資料
- 首頁
- JAVA 目錄
- JAVA WEB 目錄
- JAVA 其他未分類 目錄
- Grails目錄
- jQuery 目錄
- Apache 目錄
- JavaScript 目錄
- Spring + Hibernate 目錄
- Hibernate 目錄
- Linux 目錄
- 程式開發工具目錄
- MySQL 目錄
- PHP目錄
- C/C++ 目錄
- Google App Engine 目錄
- HTML5/CSS3
- 程式開發基本資訊
- Android
- Oracle 目錄
- Struts 目錄