Javascript入门
文章平均质量分 63
yonguo
这个作者很懒,什么都没留下…
展开
-
如何改变样式
js 代码 document.getElementById("XXX").className="定义的css样式名";2007-07-16 12:57:24 · 95 阅读 · 0 评论 -
JavaScript读写Cookie
写Cookie: [code] function saveUsername(theForm) { var expires = new Date(); expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx 30 days. setCookie("use...2007-07-16 15:59:12 · 95 阅读 · 0 评论 -
showModalDialog一个窗口后,如何可以控制父窗口
parent.jsp: js 代码 window.showModalDialog('child.jsp',window,'dialogWidth:640px;dialogHeight:520px;status:no;help:no'); child.jsp: js 代码 <script type="text/javascript"> ...2007-08-01 20:24:32 · 375 阅读 · 0 评论 -
Javascript 去除空格函数
js 代码 String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prototype.LTrim = function() { retu...2007-08-23 21:11:07 · 598 阅读 · 0 评论 -
关闭窗口时执行,刷新窗口不执行
项目中需要控制同一用户不能重复登录,所以必须在用户关闭窗口时清除session,上网一搜,基本上都用的 下面这种方法: js 代码 function window.onbeforeunload() { if(event.clientX>360&&event.clientY<0||event.altKey)...2007-08-29 21:22:44 · 795 阅读 · 0 评论 -
居中的弹出式窗口
方式一:JS代码创建窗口 js 代码 <script> var popup = new Object() function CenterPopup(URL, width, height) { // Window dimensions: var theWidth, theHe...2007-08-30 21:50:31 · 113 阅读 · 0 评论 -
window.open用法详解(转)
javaeye的这个编辑器有点太让人失望了,拷贝过来的文章总是变成乱码,强烈建议提供消除文章中格式的功能! blog.csdn.net/alexcao247/archive/2007/07/05/1679416.aspx...2007-09-10 13:38:50 · 224 阅读 · 0 评论 -
CSS IE6、IE7、FF兼容性的详细CSS HACK
现在我大部分都是用!important来hack,对于ie6和firefox测试可以正常显示,但是ie7对! important可以正确解释,会导致页面没按要求显示!搜索了一下,找到一个针对IE7不错的hack方式就是使用“*+html”,现在用IE7浏 览一下,应该没有问题了。 现在写一个CSS可以这样: #example { color: #333; } /* Moz */ * ...原创 2009-10-20 17:08:13 · 134 阅读 · 0 评论