javaeye的这个编辑器有点太让人失望了,拷贝过来的文章总是变成乱码,强烈建议提供消除文章中格式的功能! blog.csdn.net/alexcao247/archive/2007/07/05/1679416.aspx
方式一:JS代码创建窗口 js 代码 <script>    var popup = new Object()       function CenterPopup(URL, width, height)    {        // Window dimensions:   ...
项目中需要控制同一用户不能重复登录,所以必须在用户关闭窗口时清除session,上网一搜,基本上都用的 下面这种方法: js 代码 function window.onbeforeunload()       {           if(event.clientX>360&&event.clientY<0||event.altKey)  &nb ...
js 代码 String.prototype.Trim = function()     {         return this.replace(/(^\s*)|(\s*$)/g, "");     }        String.prototype.LTrim =&nbs ...
parent.jsp: js 代码 window.showModalDialog('child.jsp',window,'dialogWidth:640px;dialogHeight:520px;status:no;help:no');    child.jsp: js 代码 <script type="text/javascript">        var w;  &nbs ...
写Cookie: function saveUsername(theForm) { var expires = new Date(); expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx 30 days. setCookie("username",theForm.j_username.value,expires); } 读Cookie: if (getCookie("username") != null) { if (do ...
js 代码 document.getElementById("XXX").className="定义的css样式名";