iframe url传参

这是我的应用



c.html 代码 

function post_qingjia(){
var pos,str,parastr; 
var referurl = document.referrer;
var localurl = location.href; 
pos = localurl.indexOf("?") 
parastr = localurl.substring(pos+5); 

var uid=parastr;//登录用户
//alert(uid);
var StartTime=document.getElementById("appDateTime").value;
var EndTime=document.getElementById("appDateTime2").value;


var post_content=document.getElementById("post_qingjia_content").value;//请假原因


$.jsonP({
//url:serverURL+'/ashx/add_qingjia.ashx?uid='+uid+'&post_qingjia_content='+post_qingjia_content,
url:serverURL+'/ashx/add_qingjia.ashx?uid='+uid+'&StartTime='+StartTime+'&EndTime='+EndTime+'&post_qingjia_content='+post_content+'',
success:function(data){
if(data[0].success==true){
alert(data[0].message);
window.parent.frames.location.href = '../index.html';
}
else{
alert('操作失败');
}
}
});
}   

以下为转载:



function dd(){ 
var id = window.dialogArguments; 
var url = "http://widget.weibo.com/livestream/listlive.php?language=zh_cn&width=0&height=500&uid=&skin=1&refer=1&appkey=&pic=0&titlebar=1&border=1&publish=1&atalk=1&recomm=0&at=0&atopic=" + "&ptopic="+this.alt;
document.getElementById("oframe").src = url;


行了,只要src被赋值,iframe本就会重新加载

你可能感兴趣的:(jq,Mobile)