日期:2014-05-17  浏览次数:20756 次

IE firefox 菜鸟问题
我想用html做一个左边可伸缩布局,网上找的代码如下
html>
<head>
<SCRIPT>
function switchSysBar(){
if (switchPoint.innerText==3){
switchPoint.innerText=4
document.all("frmTitle").style.display="none"
}else{
switchPoint.innerText=3
document.all("frmTitle").style.display=""
}}
</SCRIPT></head>
<BODY scroll=no style=MARGIN:0px>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100% width=100%>
<TBODY><TR><TD align=middle id=frmTitle noWrap vAlign=center>
<IFRAME frameBorder=0 name=yuzi scrolling=auto src=LEFT.HTML  style="HEIGHT:100%;VISIBILITY:inherit;WIDTH:210px;Z-INDEX:2"></IFRAME>
<TD bgColor=0095F9>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100%>
<TBODY><tr><TD onclick=switchSysBar() style=HEIGHT:100%;>
<font style="COLOR:white;CURSOR:hand;FONT-FAMILY:Webdings;FONT-SIZE:9pt">
<SPAN id=switchPoint>3</SPAN>
</TBODY></TABLE></TD><TD style=WIDTH:100%>
<IFRAME frameBorder=0 id=main name=news scrolling=yes src=RIGHT.HTML style="HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:1"></IFRAME>
</TR></TBODY></TABLE></html>


为什么两个效果不一样?
问题一:在FireFox 这句JS “switchPoint.innerText=4” 似乎没效果,不能这么写吗?
问题二:在IE 中<SPAN id=switchPoint>3</SPAN> 变成了箭头,求解释
菜鸟学习中

------解决方案--------------------
引用:
Quote: 引用:


<html>
<head>
<SCRIPT>
function switchSysBar(){
if (switchPoint.innerText=="3"){
switchPoint.innerText="4";
document.all("frmTitle").style.display="none";
}else{
switchPoint.innerText="3";
document.all("frmTitle").style.display="";
}}
</SCRIPT></head>
<BODY scroll=no style=MARGIN:0px>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100% width=100%>
<TBODY><TR><TD align=middle id=frmTitle noWrap vAlign=center>