没有合适的资源?快使用搜索试试~ 我知道了~
jquery trigger伪造a标签的click事件取代window.open方法
2 下载量 14 浏览量
2020-12-29
18:36:15
上传
评论
收藏 27KB PDF 举报
温馨提示
试读
1页
var ohtml='<div class=friend-dialog tac pt15 pb20>'+ '<div class=f-h32>您已经成功发送好友申请。</div>'+ ' <p class=c999>上传真实头像,好友申请更容易被通过哦,赶紧上传头像吧!</p> '+ '<a>/teacher/editUserAvatar.action target=_blank><span id=awindowopen></span></a>'+ ' </div>'; $.dialog({ lock:true, title: '温馨提示'
资源详情
资源评论
资源推荐
jquery trigger伪造伪造a标签的标签的click事件取代事件取代window.open方法方法
var ohtml='<div class="friend-dialog tac pt15 pb20">'+
'<div class="f-h32">您已经成功发送好友申请。</div>'+
' <p class="c999">上传真实头像,好友申请更容易被通过哦,赶紧上传头像吧!</p> '+
'<a href="<%=path%>/teacher/editUserAvatar.action" target="_blank"><span id="awindowopen" ></span></a>'+
' </div>';
$.dialog({
lock:true,
title: '温馨提示',
button: [
{value: '点击上传图像',callback: function () {
$("#awindowopen").trigger("click");
},focus: true
}
],
content:ohtml
});
var ohtml='<div class="friend-dialog tac pt15 pb20">'+
'<div class="f-h32">您已经成功发送好友申请。</div>'+
' <p class="c999">上传真实头像,好友申请更容易被通过哦,赶紧上传头像吧!</p> '+
'<a href="<%=path%>/teacher/editUserAvatar.action" target="_blank"><span id="awindowopen" ></span></a>'+
' </div>';
$.dialog({
lock:true,
title: '温馨提示',
button: [
{value: '点击上传图像',callback: function () {
$("#awindowopen").trigger("click");
},focus: true
}
],
content:ohtml
});
需要注意的是:
在这个地方:
<a href="<%=path%>/teacher/editUserAvatar.action" target="_blank"><span id="awindowopen" ></span></a>
<a href="<%=path%>/teacher/editUserAvatar.action" target="_blank"><span id="awindowopen" ></span></a>
<a>标签内一定要有内容,并且要模拟里面的内容被点击而不是<a></a>被点击
weixin_38553837
- 粉丝: 3
- 资源: 954
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0