![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
youyousj
这个作者很懒,什么都没留下…
展开
-
IE和Firefox在JavaScript方面的兼容性(汇编)
1.document.formName.item("itemName") 问题说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];Firefox下,只能使用document.formName.elements["elementName"]. 解决方法:统一使用document原创 2007-04-10 10:24:00 · 1886 阅读 · 0 评论 -
JavaScript中的string.replace的参数
javascript中replace() 方法如果直接用str.replace("apples","oranges") 只会替换第一个匹配的字符。使用 /g 替换所有匹配的字符, /i 忽略大小写str = "Apples are round, and apples are juicy.";newstr=str.replace(/apples/gi, "oranges");document原创 2007-06-14 13:04:00 · 11974 阅读 · 0 评论 -
JavaScript 获得页面区域大小的代码
getPageSize函数返回一个数组,前两个是整个页面的宽度和高度,后两个是页面窗口的宽度和高度function getPageSize() ...{ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) ...{ xScroll = document.body.scroll原创 2007-06-14 13:19:00 · 821 阅读 · 0 评论