代码改变世界

随笔档案-2012年01月

在A窗口中打开B窗口,在B窗口中操作完以后关闭B窗口,同时自动刷新A窗口

2012-01-31 10:09 by 呦菜, 452 阅读, 收藏,
摘要: function closeWin(){ hasClosed = true; window.opener.location="javascript:reloadPage();"; window.opener=null; window.close();}function reloadPage(){ history.go(0); document.execCommand("refresh") document.location = document.location; document.location.reload();} 阅读全文

获取url参数

2012-01-05 18:18 by 呦菜, 239 阅读, 收藏,
摘要: /*------------------------------获取url参数--------------------------------*/function getParam(paramName){ paramValue = ""; isFound = false; if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=")>1) { arrSource = unescape(this.location.se 阅读全文

浏览器中table有光标

2012-01-05 15:18 by 呦菜, 480 阅读, 收藏,
摘要: 用一个table布局。其中有输入框,结果发现输入框以外的table获取焦点会有光标显示,在浏览器中打开然后按F7就可以了。。 阅读全文