除非 bt@china 修改他们的网页代码,否则用哪个版本的 Opera 都看不到的
其核心部分的 Script 不符合 W3C 标准,Opera 不支持
Opera 使用者一般都备有一个 ie 系浏览器,以备这种情况下之需 :D
[php]<SCRIPT type=text/javascript>
//<![CDATA[
function addClassName(el, sClassName) {
var s = el.className;
var p = s.split(" ");
var l = p.length;
for (var i = 0; i < l; i++) {
if (p
== sClassName)
return;
}
p[p.length] = sClassName;
el.className = p.join(" ");
}
function removeClassName(el, sClassName) {
var s = el.className;
var p = s.split(" ");
var np = [];
var l = p.length;
var j = 0;
for (var i = 0; i < l; i++) {
if (p != sClassName)
np[j++] = p;
}
el.className = np.join(" ");
}
// override getValueFromString to support Custom TD Text
SortableTable.prototype._getValueFromString = SortableTable.prototype.getValueFromString;
SortableTable.prototype.getValueFromString = function (sText, sType) {
switch (sType) {
case "PreNumber":
return parseInt(sText);
case "ByteSize":
var n = parseInt(sText);
if(sText.indexOf('GB')!=-1){
n *=1024;
n *=1024;
n *=1024;
}
else if(sText.indexOf('MB')!=-1){
n *=1024;
n *=1024;
}
else if(sText.indexOf('KB')!=-1){
n *=1024;
}
return n;
case "ShortDate":
return this._getValueFromString("2003-"+sText, "Date");
case "ShortDateTime":
var parts = sText.split(" ");
var parts1 = parts[0].split("-");
var parts2 = parts[1].split(":");
var d = new Date(2003, parts1[0], parts1[1], parts2[0], parts2[1], 0);
return d.valueOf();
}
return this._getValueFromString(sText, sType);
};
var st = new SortableTable(document.getElementById("table-1"),
[
"ShortDateTime",
"String", "String", "PreNumber", "PreNumber", "PreNumber", "PreNumber", "String", "None"
//, "Number", "ByteSize", "ByteSize"
//, "ShortDateTime"
]
);
// restore the class names
st.onsort = function () {
var rows = st.tBody.rows;
var l = rows.length;
for (var i = 0; i < l; i++) {
removeClassName(rows, i % 2 ? "odd" : "even");
addClassName(rows, i % 2 ? "even" : "odd");
}
};
//]]>
</SCRIPT>
<script language='javascript'>
<!--
if(btchina_query =='请输入关键字'){
btchina_query = ''
}
if(init_btchina!=null){
init_btchina();
}
//-->
</SCRIPT>[/php]
Opera 官方论坛中文区是 http://my.opera.com/forums/forumdisplay.php?s=&forumid=77,去那里问网页无法正常显示的问题之前一定记得先看置顶贴 http://my.opera.com/forums/showthread.php?s=&threadid=37743 (和暴风区一样) :D