很简单的语句为什么在火狐没反映是不是innerHTML不兼容火狐啊
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="vbscript">
function aa()
dim a1
a1=document.form1.a1.value
document.getElementById("bb").innerHTML=a1
end function
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="text" name="a1" id="a1" />
</label>
<label>
<input type="button" name="button" id="button" value="按钮" onclick="aa()" />
</label>
</form>
<span id="bb"></span>
</body>
</html>
------解决方案--------------------建议把:
<script language="vbscript">
function aa()
dim a1
a1=document.form1.a1.value
document.getElementById("bb").innerHTML=a1
end function
</script>
删除, language="vbscript"改为:
function aa(){
var a1=document.form1.a1.value
document.getElementById("bb").innerHTML=a1
}
------解决方案--------------------vbscript是ie的东东,firefox运行当然不行了。。
------解决方案--------------------楼主本身就写的ie only的代码。firefox不认识的。