div 按 id 刷新 需要jquery

代码一:


代码二:

function refreshMainContent(url,path,showLoading,language,locale)
{
	var action=url;

	if(url.indexOf('{')==0&&url.lastIndexOf('}')==url.length-1){
		
	}

	var mainContent = document.getElementById("mainContent");
	if (mainContent)
	{
		// Remove iframe in mainContent
		var jqIframe = jQuery('#mainContent').find("iframe");
		jqIframe.attr("src", "about:blank");
		try{//Try is for sub-window access deny(security problem).
		    jqIframe.contents().each(function()
		    {//Prevent Memory Leak
			    this.write("");
		    });
		}catch(e){}
		jqIframe.remove();

		mainContent.innerHTML = "";
	}

	jQuery("#mainContent").load(action,"",function(){
		
	});
	
	return false;
}



你可能感兴趣的:(Java,Web,web,java,jsp)