随笔分类 -  JAVASCRIPT

JavaScript/js 传输与接收参数的实例解析
摘要:在HTML中用JS接收参数先介绍一下JS中处理URL的方法: 网址示例:http://localhost/test/test.htm?id=1 script languge=javascript alert(window.location.pathname); --返回 /test/test.htm alert(window.location.search); --返回 ?id=1 alert(window.location.href); --返回 http://localhost/test/test.htm?id=1 /script ------------------------- 阅读全文
posted @ 2010-12-20 14:36 vibratea 阅读(497) 评论(0) 推荐(0)
frame框架高度自适应
摘要:function f_frameStyleResize(targObj){ var targWin = targObj.parent.document.all[targObj.name]; if(targWin != null) { var HeightValue = targObj.document.body.scrollHeight if(HeightValue 600){HeightValue = 600} targWin.style.pixelHeight = HeightValue; }}function f_iframeResize(){ bLoadComplete = t 阅读全文
posted @ 2010-12-06 11:35 vibratea 阅读(386) 评论(1) 推荐(0)
利用js控制框架的跳转和刷新
摘要:main.html<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; chars... 阅读全文
posted @ 2010-12-03 09:18 vibratea 阅读(1132) 评论(0) 推荐(0)
js中页面刷新和页面跳转的方法总结
摘要:1.history.go(-1), 返回两个页面: history.go(-2); 2. history.back(). 3. window.history.forward()返回下一页 4. window.history.go(返回第几页,也可以使用访问过的URL) 例: <a href="javascript:history.go(-1);">向上一页</a> resp... 阅读全文
posted @ 2010-09-26 11:03 vibratea 阅读(585) 评论(0) 推荐(0)
.NET下的富文本编辑器FCKeditor的配置方法
摘要:.net下的富文本编辑器FCKeditor的配置方法(图)原创 FCKeditor是一款开源的富文本编辑器,几乎支持所有流行的Web开发语言,版本稳定,用户多,可配置性好。 以前做Java和php的时候就一直用FCKeditor,现在做.net了继续用。呵呵。 我用在对文章的评论页面,所以只需要少部分功能。先看看我做好的效果: 在看看官方完整功能: 第一步:软件下载和安装 下载地址:http://... 阅读全文
posted @ 2010-09-16 16:20 vibratea 阅读(364) 评论(0) 推荐(0)
js获取下拉列表选中项的值和文本(select)以及获取单选按钮(radio)组的值和修改选中项
摘要:一、获取下拉列表选中项的值和文本(select)代码 select.htm 示例如下:=============================================================================1 2 3 ==========================================================================... 阅读全文
posted @ 2010-09-16 08:47 vibratea 阅读(295) 评论(0) 推荐(0)
关于eWebEditor常见的问题及其个人使用心得
摘要:eWebEditor是个很好用的工具,见面也很好看。是一款很受欢迎的在线编辑器。现在我和大家分享一下我近期使用eWebEditor遇到的问题及其解决办法。(这里先声明,我使用的是飞鱼修改版的eWebEditor)1.关于eWebEditor不兼容IE8的问题。在网上查了一下,发现原因是这样的,因为ie8屏蔽了anonymous方法 所以要改成onclick方法。修改如下打开include下面的ed... 阅读全文
posted @ 2010-09-16 08:46 vibratea 阅读(735) 评论(0) 推荐(0)
JS的手写TRIM函数
摘要:<script language="JavaScript"> //此处为string类添加三个成员 String.prototype.Trim = function(){ return Trim(this);} String.prototype.LTrim = function(){return LTrim(this);} String.prototype.RTrim = functi... 阅读全文
posted @ 2010-09-16 08:45 vibratea 阅读(398) 评论(0) 推荐(0)
javascript:window.print() 打印
摘要:1.JavaScript打印<input id="btnPrint" type="button" value="button" onclick="javascript:window.print();" style="color:#00f; font-weight:bold; text-decoration:none;cursor:pointer!important; cursor:hand"... 阅读全文
posted @ 2010-09-16 08:45 vibratea 阅读(2899) 评论(0) 推荐(0)
JavaScript弹窗详解
摘要:window.open ('page.html', 'newwindow', 'fullscreen')//比较简单的弹窗,全屏显示  window.open ("page.html", "newwindow", "height=100, width=400, toolbar= no, menubar=no, scrollbars=no, resizable=no, location=no, st... 阅读全文
posted @ 2010-09-16 08:44 vibratea 阅读(481) 评论(0) 推荐(0)
JS 得到两个日期天数差的方法
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="en"lang="en"> <h... 阅读全文
posted @ 2010-09-16 08:44 vibratea 阅读(531) 评论(0) 推荐(0)