摘要: document.location.href和document.location.replace都可以实现从A页面切换到B页面,但他们的区别是:用document.location.href切换后,可以退回到原页面。而用document.location.replace切换后,不可以通过“后退”退回到原页面。关于document.location.href或其他可回退的切换方式,我还发现一个细节,用个例子来说明:假设有A.htm B.htm C.htm三个页面A.htm里有这样一句:document.location.href="/b.htm";b.htm里有这样一句:document.loc 阅读全文
posted @ 2007-10-31 11:14 GT_Andy 阅读(14431) 评论(0) 推荐(0) 编辑
摘要: document.getElementById(" ") 得到的是一个对象,用 alert 显示得到的是 “ object ”,而不是具体的值,它有 value 和 length 等属性,加上 .value 得到的才 是具体的值! 参考资料: 1. document . getElementById 的用法和 DHTML.CHM 的下载地址 今天在网络上查找 document . getElementById 的用法,如下: A : 语法: oElement = document . getElementById ( sID ) 参数: sID : 必选项。字符串 (String) 。 阅读全文
posted @ 2007-10-31 10:56 GT_Andy 阅读(1836) 评论(0) 推荐(0) 编辑