取代iframe,实现页面中引入别的页面
<li>
<a href="#addChannel">添加通道</a>
</li>
window.onload = rightChange();
if(typeof window.addEventListener != undefined) {
window.addEventListener('hashchange', rightChange); //hashchange事件
} else {
window.attachEvent('hashchange', rightChange); //hashchange事件
}
var currenthash = window.location.hash;
var toUrl;
/*var addUrl = '/E'*/
switch(currenthash) {
case "#addChannel":
toUrl = 'xxx.html'
break;//添加渠道
$.ajax({
url: toUrl ,
cache: false,
success: function(data) {
$('.person_center').html(data);
},
error: function() {
alert("出错了!")
}
});