jq版的ajax
来源:互联网 发布:r语言数据可视化手册 编辑:程序博客网 时间:2024/04/28 23:20
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
</style>
</head>
<body>
<input type="text" name="name">
<button>提交</button>
<h1></h1>
</body>
<script src="js/jquery-3.2.1.min.js" ></script>
<script type="text/javascript">
$('button').on('click',function(){
$.ajax({
//后台地址
url:'http://localhost/AJAX/php/jq.php',
//请求方式
type:'post',//method
//向后台传递的数据
data:{name:$('input').val()},
//成功的回调函数 参数是后台传递过来的
success:function(res){
//alert(res);
$('h1').html(res);
},
//是否异步,默认异步
async:true
});
});
</script>
</html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
</style>
</head>
<body>
<input type="text" name="name">
<button>提交</button>
<h1></h1>
</body>
<script src="js/jquery-3.2.1.min.js" ></script>
<script type="text/javascript">
$('button').on('click',function(){
$.ajax({
//后台地址
url:'http://localhost/AJAX/php/jq.php',
//请求方式
type:'post',//method
//向后台传递的数据
data:{name:$('input').val()},
//成功的回调函数 参数是后台传递过来的
success:function(res){
//alert(res);
$('h1').html(res);
},
//是否异步,默认异步
async:true
});
});
</script>
</html>
阅读全文
0 0
- jq版的ajax
- jq的ajax
- jq - ajax -的方法
- 关于JQ的AJAX
- jQ ajax的使用
- JQ的Ajax的操作
- JQ的Ajax登陆 -3
- Jquery JQ AJAX 的使用
- jq的ajax 使用formdata
- JQ中AJAX的isModified
- ajax(3)---jq下的ajax
- jq ajax
- jQ-ajax
- jq ajax
- JQ AJAX
- jq ajax
- JQ对用户名异步校验(JQ的AJAX)
- jq live的ajax函数调用
- 移动端车牌识别ocr系统
- HttpServletResponse和HttpServletRequest详解
- Mybatis的条件分页查询
- java学习内容
- Java中的异常处理机制
- jq版的ajax
- XListView加载刷新数据的简单使用
- S
- 混合使用XML布局文件和代码控制视图
- JavaScript 面试中常见算法问题详解
- 快速排序(PAT-1045)
- mybatis视图查询异常SQLException: Prepared statement needs to be re-prepared
- JM8.6中帧内帧间模式的选择——天下第一神文
- 【前端知识点】js原型继承方式详解