$(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的值又清空了。
怎么回事?