你得用这样的标准语句,标准一些还是不错的.document.forms["表单名"].searchBy表单之外的像DIV的ID名就用document.getElementById("名")你写的这样,在FF和IE8里一律行不通,IE6肯定行。具体的东西,你可以参考一下微软的DOM文档和FF的DOM文档手册。微软的手册网上就有很多下载的地方,FF的手册最好去官网看吧里边是最新的。
解决方案 »
- 如何利用js实现两个select之间的数据传递
- 如何触发input type="file"的选择文件框?
- js日期控件乱码问题
- JSF中利用richfaces控件能否实现图片拖动的效果?
- javascript中獲取日期值
- 求一个鼠标点击两边箭头,图片可以左右滑动的js代码?
- 能动态改变文本框内选定文字的大小及字体吗????
- 怎么用js判断用户对提示下载的activex是否选择下载?
- 页面中有两个iframe,为什么用window.frames.frameid方法得不到iframe
- 各位麻烦一下, 请问怎么将 子窗口里的参数传到父窗口,并且让父窗口刷新一次!!!
- JS函数在firefox,报未定义错误,在IE中运行正常
- javascript 开源么?
<select name="searchBy" id="searchBy" style="width:70px;">
</select>
document.getElementById("searchBy").selectedIndex =1;
2.
<select name="list1" id="list1" style="WIDTH: 174px" onchange="On1ItemChange();" > </select>
<img title="name" height="16" src="images/test.gif" width="16"
align="absMiddle" onclick="T(document.getElementById('list1'));"/>
例如:
1.var selectedIndex = object.selectedIndex;//提示:object is null
2.for(var i=object.options.length-1; i>=0; --i)//提示:object is null
<select name="searchBy" id="searchBy" style="width:70px;">
</select>
<script type="text/javascript">
document.getElementById("searchBy").selectedIndex =1;
</script>
2.
<select name="list1" id="list1" style="WIDTH: 174px" onchange="On1ItemChange();" > </select>
<img title="name" height="16" src="images/test.gif" width="16"
align="absMiddle" onclick="T('list1')"/>把function T()改为function T(id)
var object=document.getElementById(id);
for(var i=object.options.length-1; i>=0; --i)
...
var fdate=new Date(year,month-1,date,hh,mm,ss);
fdate.getYear()错误: fdate.getYear is not a function