
jQuery
Balmunc
常常因为自己不够优秀而感到恐慌
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[jQuery]div滚动条回到最底部
【代码】[jQuery]div滚动条回到最底部。原创 2022-09-26 10:02:17 · 717 阅读 · 0 评论 -
[jQuery]获取div滚动条位置
$('div').scrollTop()原创 2021-10-10 11:36:18 · 680 阅读 · 0 评论 -
[jQuery]div滚动条回到最顶部
$('div').scrollTop(0);原创 2021-10-08 13:44:34 · 564 阅读 · 0 评论 -
[jQuery]监听error事件
<div class="img-div"> <img class="img" src="https://xxx/1title="点击放大"></div><script> $(function(){ //正确写法 $("img.img").error(function(){}); ...原创 2019-07-13 06:54:03 · 758 阅读 · 0 评论 -
[jQuery]判断json是否为空
$.isEmptyObject(conditionJson);原创 2019-01-28 17:09:20 · 4132 阅读 · 0 评论 -
[jQuery]获取上传的文件大小
<input type='file' name='apk_file' class="text" id="apk_file"/><label id="size"><?php echo round($v['size']/(1024*1024), 2);?>MB</label>$('#apk_file').change(function原创 2017-11-20 10:59:25 · 806 阅读 · 0 评论 -
[jQuery]使用dialog
<div class="comBox" hidden="hidden" id="dialog"></div><script language='javascript'>function openDialog(){ $("#dialog").dialog({ 'width':'850',原创 2017-11-20 11:11:31 · 884 阅读 · 0 评论 -
[jQuery]使用ajax
$('.new_config').click(function(){ $.ajax({ type: "POST", url: "?ct=parent_package&ac=detail", data: "id=" + $('#parent_id').val(), dataType...原创 2017-11-20 11:17:34 · 263 阅读 · 0 评论 -
[jQuery]使用this作为函数参数
<a href="javascript:void(0)" game="gcld" onclick="del(this)">删除</a>function del($this){ var game = $($this).attr('game'); console.log(game)}打印结果:gcld...原创 2016-10-21 11:19:10 · 6772 阅读 · 0 评论 -
[jQuery]解决动态生成input无法触发click事件的问题
<div class='div_delServer'><input type="button" class="delServer" value="删除服务器"></div>$('.delServer').click(function() { alert("ok");});原因:异步导致绑定事件失败。解决方法:1、使用全局绑定事件$(docu......原创 2017-01-05 21:41:38 · 6296 阅读 · 0 评论 -
[jQuery]解决php使用json_encode在前端返回字符串的问题
$.post('/home/?r=login/doLogin',{user:user,passwd:passwd},function(res){})解决方法$.post添加第四个参数$.post('/home/?r=login/doLogin',{user:user,passwd:passwd},function(res){},'json')...原创 2017-01-05 15:50:51 · 4794 阅读 · 0 评论