$(function(){
$("#ckcp").click(function(){
$("#cpiframe").attr("src","http://localhost/");
alert("1");
})
}) <div id="cp" style="display:block;">
<iframe id="cpiframe" src="" scrolling=no marginheight=0 marginwidth=0 width=1000px height=400px></iframe>
</div>
在弹框弹出1的时候src的值被赋值了。
当点击弹框的确定的时候src的值又清空了。
怎么回事?
$("#ckcp").click(function(){
$("#cpiframe").attr("src","http://localhost/");
alert("1");
})
}) <div id="cp" style="display:block;">
<iframe id="cpiframe" src="" scrolling=no marginheight=0 marginwidth=0 width=1000px height=400px></iframe>
</div>
在弹框弹出1的时候src的值被赋值了。
当点击弹框的确定的时候src的值又清空了。
怎么回事?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货