jq封装ajax

来源:互联网 发布:光伏产业数据查询 编辑:程序博客网 时间:2024/06/03 20:59
<!doctype html>
<html lang="en">
<head>
<title>jquery的ajax</title>
</head>
<body>
<input type="button" value="点击" id="btn">
<script type="text/javascript" src="jquery-1.11.2.js"></script>
<script type="text/javascript">
$(function(){
$("#btn").click(function(){
          $.ajax({
type : "get",
url : './05open.php?username=中国&password=123',
success : function(data){
console.log(data);
}
 });


});
});


</script>
</body>
</html>
原创粉丝点击