javascript - 钉钉网页版管理端 导航栏不刷新 只刷新内容的技术具体是什么
}function openItem(itemIndex, tab){
if(typeof(itemIndex) == 'undefined'){var itemIndex = menu[currTab]['default'];}var id= '#item_' + itemIndex;if(tab){var parent = tab;}else{var parent= $(id).attr('parent');}/* 若不在当前选项卡内 */if(parent != currTab){/* 切换到指定选项卡 */switchTab(parent);}/* 高亮当前项 */$('#submenu').find('a').each(function(){$(this).removeClass('selected');});$(id).addClass('selected');/* 更新iframe的内容 */$('#workspace').show();$('#workspace').attr('src', $(id).attr('url'));/* 将该操作加入到历史访问当中 */addHistoryItem(currTab, itemIndex);登录后复制}/ 设置工作区 /function setWorkspace(){
var wWidth = $(window).width();var wHeight = $(window).height();$('#workspace').width(wWidth - $('#left').width() - parseInt($('#left').css('margin-right')));$('#workspace').height(wHeight - $('#head').height());登录后复制}
这是相关的 HTML dom:
<div id="leftMenus"><dl id="submenu"><dt><a class="ico1" id="submenuTitle" href="javascript:;"></a></dt></dl> </div></div><div id="right"><iframe frameborder="0" style="display:none;" width="100%" id="workspace"></iframe></div>登录后复制