0
点赞
收藏
分享

微信扫一扫

Jquery 设置 iframe src属性


 

var ss= "http://www.baidu.com?n="+ Math.random();
$("#hardIframe").attr("src",ss);
$('#hardIframe').attr('src', $('#hardIframe').attr('src'));

function refWin(){
	$.ajax({
		type : 'POST',
		url : $.test.contextPath
				+ "/demoAction.do?method=getMonUrl",
		dataType: 'json',
		success : function(data) {
			if($.test.isNotEmpty(data.error)){
				$.messager.alert('[堤示]', "系统异常!", 'error');
				return;
			}
			var sr= data.url+"?n="+ Math.random();
			$("#hardIframe").attr("src",sr);
		},
		error : function(XMLHttpRequest, textStatus, errorThrown) {
		}
	});
}

 

举报

相关推荐

0 条评论