js 数组 select的option的value 及js控制css的class的方法
js的数组使用 需要先 定义 如
var array=new Array();
二维数组
var array=new Array(new Array(),new Array());
select 的option的value值
通过如下方式取得:
this.options[this.options.selectedIndex].value
而不是this.options.selectedIndex.value
留意一下 以后不再犯相同错误.
通过js修改class的方法
<span id='xxx' class='yyy'></span>
document.getElementById('xxx').className="zzz";
必须用className 而不能直接document.getElementById('xxx').class=‘zzz’
className注意大写
IE6、IE7、FF通用无提示关闭窗口代码:
<script>
window.opener=null;
window.open('','_self');
window.close();
</script>

被折叠的 条评论
为什么被折叠?



