//<script>
/*
* ScrollButton
*
* This script was designed for use with DHTML Menu 4
*
* This script was created by Erik Arvidsson
* (http://webfx.eae.net/contact.html#erik)
* for WebFX (http://webfx.eae.net)
* Copyright 2002
*
* For usage see license at http://webfx.eae.net/license.html
*
* Version: 1.02
* Created: 2002-05-28
* Updated: ??? Memory management updates
* 2003-09-23 Changed to using onunload instead onbeforeunload
*
*/
Menu.keyboardAccelKey = 27; // the keyCode for the key tp activate
Menu.keyboardAccelKey2 = 121; // the menubar
Menu.keyboardAccelProperty = "ctrlKey"; // when this property is true default
// actions will be canceled on a menu
// Use -1 to disable keyboard invoke of the menubar
// Use "" to allow all normal keyboard commands inside the menus
Menu.prototype.add = function ( mi, beforeMi ) {
if ( beforeMi != null ) {
var items = this.items;
var l = items.length;
var i = 0;
for ( ; i < l; i++ ) {
if ( items[i] == beforeMi )
break;
}
this.items = items.slice( 0, i ).concat( mi ).concat( items.slice( i, l ) );
// update itemIndex
for (var j = i; j < l + 1; j++)
this.items[j].itemIndex = j;
}
else {
this.items.push( mi );
mi.itemIndex = this.items.length - 1;
}
Menu.prototype.remove = function ( mi ) {
var res = [];
var items = this.items;
var l = items.length;
for (var i = 0; i < l; i++) {
if ( items[i] != mi ) {
res.push( items[i] );
items[i].itemIndex = res.length - 1;
}
}
this.items = res;
mi.parentMenu = null;
return mi;
};
Menu.prototype.toHtml = function () {
var items = this.items;
var l = items.length
var itemsHtml = new Array( l );
for (var i = 0; i < l; i++)
itemsHtml[i] = items[i].toHtml();
已经查到大概的原因了。
生成菜单的js用的是Erik Arvidsson的DHTML Menu 4
详见:http://webfx.eae.net (这个网站有很多有用的东东)
在改变浏览器字体后就会出现这种情况。
但把字体改回去也还是这样子。。。。
现在的问题是:怎么恢复正常?
我的电脑本来菜单显示正确的,现在也恢复不了了。
下面是posLib.js的代码。
//<script>
/*
* Position functions
*
* This script was designed for use with DHTML Menu 4
*
* This script was created by Erik Arvidsson
* (http://webfx.eae.net/contact.html#erik)
* for WebFX (http://webfx.eae.net)
* Copyright 2002
*
* For usage see license at http://webfx.eae.net/license.html
*
* Version: 1.1
* Created: 2002-05-28
* Updated: 2002-06-06 Rewrote to use getBoundingClientRect(). This solved
* several bugs related to relative and absolute positened
* elements
*
*
*/
// This only works in IE5 and IE6+ with both CSS1 and Quirk mode