![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jq+ajax
苗先生的PHP记录
有什么我碰到的问题, 看了我的笔记没有解决,可以在帖子中留言 , 大家一起探讨解决!
正在想跨出舒适圈,而每个人都喜欢在舒适圈里呆着,整得我都进不去了-v-
懒得要命 ,很少做原理文字分析,都是自己在项目中遇到的问题或笔记,我只要结果不要过程!
展开
-
jq获取下拉框选中的值和文本
获取文本$("select[name='province']optionselected").text()获取选中值$("select[name='province']optionselected").val()原创 2022-07-27 11:30:45 · 821 阅读 · 0 评论 -
JQUERY的AJAX和遍历数组JSON代码
jQuery.ajax({ type: "POST", url: "server.json", dataType:'json', data: "", success: function(msg){ var title = ""; jQuery.each(msg,function(key,value){ .原创 2022-04-06 23:50:43 · 936 阅读 · 0 评论 -
JS 控制按钮点击后不可用
为了防止用户多次点击某按钮,造成多次提交表单的操作。某些按钮需要在点击后实现不可用操作。document.form1.Submit.disabled = false;原创 2022-04-06 23:49:09 · 1233 阅读 · 0 评论 -
.ajax .post .get
$.post 参数一:请求发送的url, 参数二:规定请求发送的数据, 参数三(可选):请求成功时运行的方法demo:aqy$.post('{:url("admin/change")}',{'id':id,'status':status},function (res) { if(res.code>0){ layer...原创 2020-04-19 11:55:16 · 70 阅读 · 0 评论 -
前台form表单js调用后台方法
<form method="get" action="{:url(' index/index')}"><button>提交</button></form><form method="get" action=""><button onclick="save()">提交</button>&l...原创 2020-04-16 20:46:07 · 277 阅读 · 0 评论 -
**点击checkBox 实现全选,反选,删除**
点击checkBox 实现全选,反选,删除删除所有的jquery// 删除所有的button 的onclick = " delAll() ";// 批量删除提交 数组,后台接收遍历数组调用按ID删除数据的方法// checkId 本记录的checkbox的name function delAll () { layer.confirm('...原创 2020-07-25 15:49:16 · 250 阅读 · 0 评论 -
获取点击的td的值
首先在需要获取值的 td 中加入onclick方法<table class="layui-table"> <thead> <tr> <th>ID</th> <th>用户名</th> ...原创 2020-10-12 10:58:46 · 1517 阅读 · 0 评论 -
图片上传,单独上传类,模型事件方法,修改图片删除原图片
后台类 public function upload_img() { $file = request()->file('file'); if ($file == null){ exit(json_encode(array('code'=>1,'msg'=>'没有上传文件'))); } ...原创 2020-04-17 15:08:47 · 196 阅读 · 0 评论 -
文本框失去鼠标焦点执行ajax+php
o2o/admin/ categoryview<td class="text-c listorder"><input type="text" name="listorder" value="{$vo.listorder}" attr-id="{$vo.id}" size="3"></td>view -> js<script> var...原创 2019-09-06 12:04:35 · 155 阅读 · 0 评论