随笔分类 -  JavaScript

摘要:[代码] 阅读全文
posted @ 2009-04-04 10:36 烈马狂生 阅读(207) 评论(0) 推荐(0)
摘要:1.在使用控件的页面: 2.fckeditor.js //让PostEditor不可见 oTextarea.style.display = 'none' ; //在当前页面插入一个iframe;该iframe指向fckeditor.original.html '' ; ------------------fckeditor.original.html-----------------... 阅读全文
posted @ 2008-05-24 16:59 烈马狂生 阅读(706) 评论(1) 推荐(0)
摘要:1 2 3 4 5 23 24 1.js中也可以有类似名称空间的想法。第6,7,8行。其实就是3个名称空间:elong elong.Commands elong.Commands.LoadedCommands 对于当前的名称空间,要获取下一级的对象可用this获得。第17,18行表明了这点。 2.对象的属性可以像数组那样访问,所以这就提供了一种动态的增加对象的属性的方法... 阅读全文
posted @ 2008-05-22 11:04 烈马狂生 阅读(184) 评论(0) 推荐(0)
摘要:json创建对象的一般格式如下: var myobject = {属性名1:属性值1,属性2:属性值,...,属性名n:属性值n} 定义1:var circle = { "x":0, y:0, radius:2, alerttest:function(mm){alert(mm);}, birthday: {year:'1982年',month:'2月',day:'14日'}} 定义2... 阅读全文
posted @ 2008-05-21 17:44 烈马狂生 阅读(312) 评论(0) 推荐(0)
摘要:转自:http://bbs.51js.com/thread-59672-1-1.html apply: 方法名A.apply(对象名B, [执行A需要的参数,用数组表示]); call: 方法名A.call(对象名B, [执行A需要的参数,用逗号分隔]); apply和call功能是: 执行某一个对象的方法A, 但在执行的时候临时把它内部的this指向一个别的对象B, 后面是执... 阅读全文
posted @ 2008-05-20 15:12 烈马狂生 阅读(329) 评论(0) 推荐(0)
摘要:1.乱码的问题 a. b.用vs.net打开。把记事本打开的js拷贝进去。保存 2.判断变量是否存在 if(typeof(headerWidth)=="undefined") {} 3.判断某个函数是否存在 if(typeof(AdjustPageImage) == "function"){} 阅读全文
posted @ 2007-09-27 15:12 烈马狂生 阅读(158) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2007-06-01 09:07 烈马狂生 阅读(341) 评论(2) 推荐(0)
摘要: 阅读全文
posted @ 2007-04-01 19:42 烈马狂生 阅读(412) 评论(0) 推荐(0)
摘要:dodo 技术部 合作部 销售部 ... 阅读全文
posted @ 2006-07-21 11:10 烈马狂生 阅读(1447) 评论(1) 推荐(0)
摘要:javascript小技巧 Posted on 2006-04-01 16:05 torome 阅读(202) 评论(0) 编辑 收藏 引用 收藏至365Key 所属分类: JS&HTML&CSS --> 事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setC... 阅读全文
posted @ 2006-07-19 19:56 烈马狂生 阅读(559) 评论(0) 推荐(0)
摘要:亲爱的 Web Team: 我想在我的 Web 页上添加一个 HTML 表元素,该页上的第一个 TR 元素(或者可能是 )是静态的,而其余的 TR 元素(或 )是可以滚动的,这可以实现吗?到目前为止,我已经尝试了为标题创建一个单独的表元素,然后围绕“正文”表包装一个 div 元素,并向样式属性添加“overflow: auto”。我是为专门使用 Internet Explorer 5.0 或更高版... 阅读全文
posted @ 2006-07-15 10:44 烈马狂生 阅读(422) 评论(0) 推荐(0)
摘要:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... 阅读全文
posted @ 2006-07-14 18:30 烈马狂生 阅读(295) 评论(0) 推荐(0)
摘要:Visit MicrosoftIn this example we change the text and the URL of a hyperlink. We also change the target attribute.The target attribute is by default set to "_self", which means that the link will open... 阅读全文
posted @ 2006-07-14 18:29 烈马狂生 阅读(249) 评论(0) 推荐(0)
摘要:Click to see what element I am!-----------------------------------------------------______________________________________________________First anchorSecond anchorThird anchorNumber of anchors in this... 阅读全文
posted @ 2006-07-14 18:27 烈马狂生 阅读(311) 评论(0) 推荐(0)
摘要:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... 阅读全文
posted @ 2006-07-14 18:26 烈马狂生 阅读(350) 评论(0) 推荐(0)
摘要:Row1 cell1Row1 cell2Row2 cell1Row2 cell2 Row 1 Row 2 Row 3 cell 1cell 2cell 3cell 4cell 5cell 6cell 7cell 8cell 9cell 10------------------------------------------------------------------------... 阅读全文
posted @ 2006-07-14 18:22 烈马狂生 阅读(492) 评论(0) 推荐(0)
摘要://1.从当前窗口打开一个新窗口。同时关闭当前窗口。 function OpenWindow(){ var winLeft = window.screen.width/2-320; var winTop = window.screen.height/2-220; window.open('www.sina.com','','height=440,width=640,top='+w... 阅读全文
posted @ 2006-06-09 09:47 烈马狂生 阅读(335) 评论(0) 推荐(0)
摘要:在写javascript脚本时一定要注意:一定要遵守变量线申明,后使用的原则. 问题:自从加了Omniture代码后,我的程序中出现了,一个js脚本错误.查了半天才发现.Omniture代码中申明了一个全局的s变量.我的代码如下: function FTB_Editor_onPaste() {try{ var text = window.clipboardData.getData('Text')... 阅读全文
posted @ 2005-09-14 14:37 烈马狂生 阅读(298) 评论(0) 推荐(0)
摘要:1.动态操作的url 注册新用户? 2.取select当前选中值的方法。 var p = document.getElementById('selectID');alert(p.options[p.options.selectedIndex].value); 阅读全文
posted @ 2005-09-09 09:30 烈马狂生 阅读(218) 评论(0) 推荐(0)
摘要:javascript可以轻松操作客户端剪贴板内容,不过只适用IE5以上浏览器 javascript可以使用window.clipboardData对象处理剪贴板内容 保存到剪贴板的方法 setData(param1, param2) param1 :数据类型 text 或 URL等. param2 :数据内容 从剪贴板读出数据的方法 getdata(param1) 清空数据的方法 c... 阅读全文
posted @ 2005-04-17 14:43 烈马狂生 阅读(599) 评论(1) 推荐(0)