随笔分类 -  JS

JavaScript
摘要:今天在项目中遇到一个郁闷的问题, HTML中定义某些标签元素,然后取到ID好并且输出HTML元素,INNERHTML,INNERTEXT,OUTERHTML在IE/OPERA下面运行正常,但是在FF下唯独只有outerHTML无效,在网上一搜索,原来outerHTML不是W3C的标准属性,所以不对其支持. 正好在网上找到一篇解决方案,在这里先谢谢作者帮了小弟一个大忙 其实只要在JS中加上一些代码就... 阅读全文
posted @ 2008-07-01 17:05 Anson2020 阅读(838) 评论(0) 推荐(0)
摘要:document.getElementById("divid").setAttribute("onmouseout", "javascript:this.style.backgroundColor='#fff'"); 上面这行代码在Firefox 下能正常运行,然后放在IE下却不能运行.因为在IE下这行代码没有生效 给上面一行代码稍作修改就能使它兼容在IE和FF下. document.getEle... 阅读全文
posted @ 2008-04-25 10:50 Anson2020 阅读(1892) 评论(3) 推荐(0)
摘要:1.建立一个aspx页面 html代码 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> Ajax Tree 2.cs代码 Code highlighting produced by Actipro Code... 阅读全文
posted @ 2007-11-19 17:16 Anson2020 阅读(1179) 评论(1) 推荐(0)
摘要:CSS Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->body,table,td,th,input,textarea,button,select{font:13px/16px Verdana,"宋体",sans-serif;} table{... 阅读全文
posted @ 2007-11-16 11:02 Anson2020 阅读(1260) 评论(3) 推荐(0)
摘要:1.取消按钮按下时的虚线框 在event)" class="t_tag">input里添加属性值 hideFocus 或者 HideFocus=true 2.只读文本框内容 在input里添加属性值 readonly 3.防止退后清空的TEXT文档(可把style内容做做为类引用) 4.ENTER键可以让光标移到下一个输入框 5.只能为中文(有闪动) 6.只能为... 阅读全文
posted @ 2007-11-06 13:46 Anson2020 阅读(452) 评论(0) 推荐(0)
摘要:1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 no 可用于Table 2. 取消选取、防止复制 3. onpaste="return false" 不准粘贴 4. oncopy="return false;" oncut="return false;" 防止复制 5. IE地址栏前换成自己的图标 6. 可以在收藏夹中... 阅读全文
posted @ 2007-09-29 10:40 Anson2020 阅读(569) 评论(3) 推荐(0)
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.... 阅读全文
posted @ 2007-08-21 17:00 Anson2020 阅读(1217) 评论(0) 推荐(0)