我有一個基於JavaScript的頁面菜單,其中從數據庫生成菜單項。簡單的菜單系統看起來像Internet Explorer 10 - 新的換行符空格
function LoadMenus() {
window.fw_menu_1 = new Menu("root",165,17,"Verdana, Arial, Helvetica, sans-serif",11,"#ffffff","#000000","#597B7B","#FFF9DC","left","middle",4,0,1000,-5,7,true,true,true,5,true,true);
fw_menu_1.addMenuItem("Menu Item 1","location='#'");
fw_menu_1.addMenuItem("Menu Item 2","location='#'");
fw_menu_1.addMenuItem("Menu Item 3","location='#'");
fw_menu_1.addMenuItem("Menu Item 4","location='#'");
fw_menu_1.addMenuItem("Menu Item 5","location='#'");
fw_menu_1.addMenuItem("Menu Item 6","location='#'");
fw_menu_1.hideOnMouseOut=true;
}
首先是不會顯示在菜單上的所有IE10,直到我用
<meta http-equiv="X-UA-Compatible" content="IE=9">
但是,當我能夠顯示菜單的所有項目有新的換行符除了代替間隔菜單項6,我已經用常規空間替換了非破壞空間的標籤。
任何線索爲什麼IE10將所有常規空間切換到新換行符?
感謝
每請求
function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh, halgn, valgn, pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah)
{
this.version = "020320 [Menu; mm_menu.js]";
this.type = "Menu";
this.menuWidth = mw;
this.menuItemHeight = mh;
this.fontSize = fs;
this.fontWeight = "plain";
this.fontFamily = fnt;
this.fontColor = fclr;
this.fontColorHilite = fhclr;
this.bgColor = "#ffffff";
this.menuBorder = 1;
this.menuBgOpaque=opq;
this.menuItemBorder = 1;
this.menuItemIndent = idt;
this.menuItemBgColor = bg;
this.menuItemVAlign = valgn;
this.menuItemHAlign = halgn;
this.menuItemPadding = pad;
this.menuItemSpacing = space;
this.menuLiteBgColor = "#ffffff";
this.menuBorderBgColor = "#777777";
this.menuHiliteBgColor = bgh;
this.menuContainerBgColor = "#ffffff";
this.childMenuIcon = "arrows.gif";
this.submenuXOffset = sx;
this.submenuYOffset = sy;
this.submenuRelativeToItem = srel;
this.vertical = vert;
this.items = new Array();
this.actions = new Array();
this.childMenus = new Array();
this.hideOnMouseOut = true;
this.hideTimeout = to;
this.addMenuItem = addMenuItem;
this.writeMenus = writeMenus;
this.MM_showMenu = MM_showMenu;
this.onMenuItemOver = onMenuItemOver;
this.onMenuItemAction = onMenuItemAction;
this.hideMenu = hideMenu;
this.hideChildMenu = hideChildMenu;
if (!window.menus) window.menus = new Array();
this.label = " " + label;
window.menus[this.label] = this;
window.menus[window.menus.length] = this;
if (!window.activeMenus) window.activeMenus = new Array();
}
function addMenuItem(label, action) {
this.items[this.items.length] = label;
this.actions[this.actions.length] = action;
}
我們應該知道addMenuItem是什麼? – epascarello 2013-02-12 20:28:32
或'Menu'?...... – 2013-02-12 20:29:04
添加了兩個腳本。不知道是否與Macromedia JS部分相關,但是用新換行符取代空格很奇怪:\ – JackTheKnife 2013-02-12 20:43:18