摘要: 高级应用(二) //组件是否安装 isComponentInstalled("{6B053A4B-A7EC-4D3D-4567-B8FF8A1A5739}", "componentID")) //检查网页是否存在 function CheckURL(URL) { var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.Open("GET",URL, false); try { xmlhttp.Send(); var result = xmlhttp 阅读全文
posted @ 2011-06-15 19:04 春哥也编程 阅读(561) 评论(0) 推荐(0)
摘要: 事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.returnVal 鼠标位置 event.x event.y 窗体活动元素 document.activeElement 绑定事件 document.captureEvents(Event.KEYDOWN 阅读全文
posted @ 2011-06-15 19:03 春哥也编程 阅读(185) 评论(0) 推荐(0)
摘要: //不缓存 <META HTTP-EQUIV="pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> <META HTTP-EQUIV="expires" CONTENT="0"> //正则匹配 匹配中文字符的正则表达式: [\一-\龥] 匹配双字节字符(包括汉字在内):[^\x00-\xff] 匹配 阅读全文
posted @ 2011-06-15 19:03 春哥也编程 阅读(195) 评论(0) 推荐(0)
摘要: document.getElementById("div1").attachEvent("onmouseover",function(){change("参数");});document.getElementById("div1").onmouseover = function(){change("参数");}; 阅读全文
posted @ 2011-06-15 18:52 春哥也编程 阅读(733) 评论(0) 推荐(0)
摘要: 1、绑定到元素,这也是比较常见的一种比如: <input type="button" onclick="doEventThing(event)">触发:击此按钮 2、绑定事件到对象:这也是比较常见的一种,特别是在IE4+下面: document.getElementById("divid").onclick = doEventThing;3、使用<script for>进行事件的绑定,这只在IE4+下有用(为button1绑定事件,逻辑在script块中书写event来指定怎么触发事件): <script 阅读全文
posted @ 2011-06-15 18:49 春哥也编程 阅读(4385) 评论(0) 推荐(0)
摘要: exampleexampleexampleexampleexampleexample提示窗口exampleexampleexampleexampleexample这是提示窗口的正文区域,你可以在这里填写任何内容。效果如上所示:相关代码:<script type="text/javascript"> var popup_target; var popup_mouseposX; var popup_mouseposY; // ----- popup_exit ------------------------------------------------------ 阅读全文
posted @ 2011-06-15 18:24 春哥也编程 阅读(1010) 评论(0) 推荐(0)
摘要: 效果如下图所示:演示:JavaScript同时弹出多个DIV窗口层登陆窗口姓名: 密码: 这里的内容可以自由编辑 注册窗口您的姓名: 您的密码: E-mail: 这里的内容可以自由编辑 提示窗口这是提示窗口的正文区域,你可以在这里填写任何内容。代码吾爱:www.code52.net代码:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html 阅读全文
posted @ 2011-06-15 11:34 春哥也编程 阅读(4043) 评论(0) 推荐(1)