可以直接获取id对象

来源:互联网 发布:js页面载入事件 编辑:程序博客网 时间:2024/04/28 09:50
<body>
姓名:<input id="Text1" type="text" class="txt"/>

<script type="text/javascript">
    alert(Radio1.value);
</script>

</body>

由于id值唯一,其为window的属性,相当于window.Radio1.value;
0 0
原创粉丝点击