求助 Ie与firefox的兼容
为什么 我这段代码在IE下看不到效果 在firefox下可以
帮忙修改一下 或者帮忙写一个同样功能 二者可兼容的
将万分感谢!
<script language= "javascript ">
function se(id)
{
var item1=document.getElementById(id);
item1.style.display= " ";
}
function di(id)
{
var item1 = document.getElementById(id);
item1.value= " ";
item1.style.display= "none ";
}
</script>
<form>
<table border=1 width=100%>
<tr>
<td> 111
<input type= "text " id= "start " value= "start " style= "display:none "/>
<input type= "text " id= "end " value= "end " style= "display:none "/>
<select name= "a ">
<option value= "a " onClick= "se( 'end ');di( 'start ') "> 之前 </option>
<option value= "b " onClick= "se( 'start ');di( 'end ') "> 之后 </option>
<option value= "c " onClick= "se( 'end ');se( 'start ') "> 范围 </option>
</select>
</td>
</tr>
</table>
<table border=1>
<tr>
<td> 222
<input type= "text " id= "realstart " value= "start " style= "display:none "/> </td> <td>
<input type= "text " id= "realend " value= "realend " style= "display:none "/> </td>
<tr> <td>
<input type= "button " onclick= "se( 'realstart ') " value= "start " /> </td> <td>
<input type= "button " onclick= "se( 'realend ') " value= "end " /> </td> </tr>
<tr> <td> <select name= "a ">
<option value= "a " onClick= "se( 'realend ');di( 'realstart ') "> 之前 </option>
<option value= "b " onClick= "se( 'realstart ');di( 'realend ') "> 之后 </option>
<option value= "c " onClick= "se( 'realend ');se( 'realstart ') "> 范围 </option>
</select>
</td>
</tr>
</table>
</form>
------解决方案-------------------- <script language= "javascript ">
function se(id)
{
var item1=document.getElementById(id);
item1.style.display = " ";
}
function di(id)
{
var item1 = document.getElementById(id);
item1.value= " ";
item1.style.display= "none ";
}
function change(o) {
o.getAttribute( "onClick ")();
}
</script>
<form>
<table border=1 width=100%&g