jquery 快速入门 学习记录
1、第一个jquery程序 helloworld:
需要导入Jquery1.8.3的库 ,下载地址: jQuery1.8.3 代码令另存到本地 保存为jquery.js 引用即可。
效果: 点击按钮弹出对话框。
源码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jquery 学习1</title>
<!-- 导入jquery库 -->
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript">
$(function(){ $("button").click(function(){
alert("hello world ,write less do more !");
}); }) </script> </head>
<body>
write less do more;
<br/>
<button>click me </button> </body>
</html>