日期:2014-05-16  浏览次数:20261 次

javascript 技巧积累

直接添加代码

?

1. 设置浏览器的窗口大小 ,其中 500像素 为宽,200为高

<script >window.resizeTo(500,200); </script>

?

2. 获得本网页的标题

<script >document.write ( document.title ); </script>

?

3.获取本网页包含的表单数目

<script >document.write ( document.forms.length ); </script>

?

4.获取某个表单中某个控件的值

?

<script >document.write ( window.document.FormName.ItemName.value ); </script>