
JavaScript
loveany121
这个作者很懒,什么都没留下…
展开
-
JS取FRAME或父窗口控件的值
1子页面取父页面的控件值window.opener.document.getElementByIdx("bgmc");window.parent.document.all.fistmessage.innerText='xxxxxxxxx'2在FRAME框架下去某个FRAME页面的值 window.frames['mainFrame'].document.getElementById转载 2012-08-28 20:11:20 · 9915 阅读 · 0 评论 -
Javascript中最常用的55个经典技巧
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键no 可用于Table2. 取消选取、防止复制3. onpaste="return false" 不准粘贴4. oncopy="return false;" oncut="return false;" 防止复制5. IE地址栏前换成自己的图标6.转载 2012-08-28 20:34:05 · 1014 阅读 · 0 评论 -
再谈DIV的高度自适应
关于div高度的自适应,一直是个让人头疼的问题,整理了一下以前总结的方法,仅表示我也玩过。html code: 1 div id="container"> 2 div id="leftSide">这边的高度自适应右侧的高度div> 3 div id="rightSide"> 4 script type="text/javascript">转载 2012-08-29 00:29:50 · 742 阅读 · 0 评论 -
js去除空格函数
String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prototype.ltrim=function(){ return this.replace(/(^\s*)/g,""); } String.prototype.rtrim=functi转载 2012-08-31 13:44:35 · 2876 阅读 · 0 评论 -
全屏显示
window.onload = function() //适用于IE { window.moveTo(0, 0); var t = window.screenTop; var l = window.screenLeft; window.moveTo(-l, -t); window.res转载 2012-08-28 21:54:33 · 376 阅读 · 0 评论 -
JS中offsetTop、clientTop、scrollTop、offsetTop各属性介绍
这里是javascript中制作滚动代码的常用属性页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth (包括边线的宽);网页可见区域高: document.body.offsetHeight (包括边线的宽);网页转载 2012-08-28 21:56:12 · 499 阅读 · 0 评论 -
html框架集 js刷新页面方法大全
一、先来看一个简单的例子: 下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。 frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:复制代码 代码如下: frame 现在假设top.html (即上面的页面)转载 2012-08-28 20:08:48 · 771 阅读 · 0 评论