1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
<form name=hrong> <input type=checkbox name=All onclick="checkAll('mm')"> 全选 <br/> <input type=checkbox name=mm onclick="checkItem('All')"> <br/> <input type=checkbox name=mm onclick="checkItem('All')"> <br/> <input type=checkbox name=mm onclick="checkItem('All')"> <br/> <input type=checkbox name=mm onclick="checkItem('All')"> <br/> <input type=checkbox name=mm onclick="checkItem('All')"> <br/> <br/> <input type=checkbox name=All2 onclick="checkAll('mm2′)"> 全选 <br/> <input type=checkbox name=mm2 onclick="checkItem('All2′)"> <br/> <input type=checkbox name=mm2 onclick="checkItem('All2′)"> <br/> <input type=checkbox name=mm2 onclick="checkItem('All2′)"> <br/> <input type=checkbox name=mm2 onclick="checkItem('All2′)"> <br/> <input type=checkbox name=mm2 onclick="checkItem('All2′)"> <br/> </form> <script LANGUAGE="JavaScript"> function checkAll(str) { var a = document.getElementsByName(str); var n = a.length; for (var i = 0; i < n; i++) a[i].checked = window.event.srcElement.checked; } function checkItem(str) { var e = window.event.srcElement; var all = eval("document.hrong." + str); if (e.checked) { var a = document.getElementsByName(e.name); all.checked = true; for (var i = 0; i < a.length; i++) { if (!a[i].checked) { all.checked = false; break; } } } else all.checked = false; } </script> |
身份证的验证
[html] ?<script> ?function isIdCardNo(num) ? ? ? […]
email地址的判断
<script> function ismail(mail) { return(new RegEx […]
浏览器判断
判断浏览器的类型 window.navigator.appName 判断ie的版本 window.naviga […]
字符验证类—正则表达式
判断字符全部由a-Z或者是A-Z的字字母组成 ? ? ?<input onblur=”if( […]
表单验证类
所有的表单的值都不能为空 ? ? ? ?<input onblur=”if(this.val […]
时间格式验证类
2.1 短时间,形如 (13:04:06) ? ? ? ?function isTime(str) ? ? ? […]
数字验证类—正则表达式
整数 /^(-|+)?d+$/.test(str) 大于0的整数 (用于传来的ID的验证) /^d+$/.te […]
Javascript正则表达式验证
—–数字验证类 整数 /^(-|+)?d+$/.test(str) 大于0的整数 (用 […]
下拉菜单—滑动型
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
<style> #newcontainer { /*position:relative;*/ width:750px; text-align:left; margin:0 auto; margin-bottom:10px; margin-top:0px; } #newnav { width:750px !important; width:750px; height:27px; margin:0; padding:0; border-right:1px solid #d8d8d8; border-left:1px solid #d8d8d8; } #newnav * { padding:0; margin:0; list-style:none; overflow:hidden; } #newnav ul { width:100%; line-height:28px; background:url(../images/newnav_bg.jpg) repeat-x top; } #newnav li,#newnav li.nr { float:left; display:inline; text-align:center; width:85px; height:27px; } #newnav li.on { background:url(../images/newnav_libg1.jpg) repeat-x; width:85px; font-weight:bold; } #newnav li.end { background:url(../images/newnav_end1.jpg) repeat-x; width:91px; font-weight:bold; } #newnav a { display:block; width:85px; height:27px; } #newnav li a:link { background:url(../images/newnav_abg.jpg) no-repeat right; text-decoration:none; color:#000; } #newnav li a:visited { background:url(../images/newnav_abg.jpg) no-repeat right; color:#000; text-decoration:none; } #newnav li a:hover { background:url(../images/newnav_libg1.jpg) repeat-x; font-weight:bold; color:#000; text-decoration:none; } #newnav li a:actived { background:url(../images/newnav_abg.jpg) no-repeat right; color:#000; text-decoration:none; } </style> <script> function showSubType(type) { for (var i=1; i<=7; i++) { var td = document.getElementById("td"+i); if (td.className == "nav_select") td.className = "nav_normal"; } document.getElementById("td"+type).className = "nav_select"; var sHTML = " "; for (var i=0; i<g_arrResType[type-1].length-1; i++) { var nnn = g_arrResType[type-1][i].split("|"); sHTML += "<a href='" + nnn[1] + "' class='xtitle'>" + nnn[0] + "</a> | "; } document.getElementById("sub").innerHTML = sHTML; } var g_arrResType = [ [], ["公司论坛|bbs.do","新闻通知|news.do?do=list","考勤统计|timecard.do?do=showStat","通 讯 录|user.do?do=list",], ["工作日志|log.do?do=list","工作管理|work.do?do=list","项目查看|project.do?do=list","计划查看|plan.do?do=list",], ["信息中心|user.do?do=my","薪资查询|wage.do?do=login","历史登录|iprecord.do","修改资料|user.do?do=modifyInfo","修改密码|user.do?do=modifyPwd","个人考勤|timecard.do?do=list","短信息|pm.do?do=inbox",], ["照片中心|photo.do?do=list","我的照片|photo.do?do=mylist","添加照片|photo.do?do=add",], [], [], ]; </script> <table cellspacing='0' cellpadding='0' width='750' align='center' border='0'> <tr> <td> <div id="newcontainer" align="center"> <div id="newnav"> <ul> <li id='td1'><a href='main.do' onmouseover="showSubType(1)" class='xtitle'>首 页</a></li> <li id='td2'><a href='#' onmouseover="showSubType(2)" class='xtitle'>公司信息</a></li> <li id='td3'><a href='#' onmouseover="showSubType(3)" class='xtitle'>HIS项目</a></li> <li id='td4'><a href='#' onmouseover="showSubType(4)" class='xtitle'>个人信息</a></li> <li id='td5'><a href='#' onmouseover="showSubType(5)" class='xtitle'>靓图闪秀</a></li> <li id='td6'><a href='admin.do' onmouseover="showSubType(6)" class='xtitle'>管理维护</a></li> <li id='td7'><a href='logout.do' onmouseover="showSubType(7)" class='xtitle'>退 出</a></li> </ul> </div> <div id='sub'> </div> </div> </td> </tr> </table> |
AjaxAlert信息提示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
<head> <script type="text/javascript"> function AjaxAlert(txt) { var eSrc = (document.all) ? window.event.srcElement : arguments[1]; var shield = document.createElement("DIV"); shield.id = "shield"; shield.style.position = "absolute"; shield.style.left = "0px"; shield.style.top = "0px"; shield.style.width = "100%"; shield.style.height = ((document.documentElement.clientHeight > document.documentElement.scrollHeight) ? document.documentElement.clientHeight : document.documentElement.scrollHeight) + "px"; shield.style.background = "#333"; shield.style.textAlign = "center"; shield.style.zIndex = "10000"; shield.style.filter = "alpha(opacity=0)"; shield.style.opacity = 0; var alertFram = document.createElement("DIV"); alertFram.id = "alertFram"; alertFram.style.position = "absolute"; alertFram.style.left = "50%"; alertFram.style.top = "50%"; alertFram.style.marginLeft = "-225px"; alertFram.style.marginTop = -75 + document.documentElement.scrollTop + "px"; alertFram.style.width = "450px"; alertFram.style.height = "150px"; alertFram.style.background = "#ccc"; alertFram.style.textAlign = "center"; alertFram.style.lineHeight = "25px"; alertFram.style.zIndex = "10001"; strHtml = "<ul style=\"list-style:none;margin: 0px;padding: 0px;width:100%\">"; strHtml += "<li style=\"background: #73A2D6;text-align:left;padding-left:20px;font-size:14px;font-weight:bold;height:25px;line-height:25px;border:1px solid # 9FBFE3;\">[系统提示]</li>"; strHtml += " <li style=\"background: #fff;text-align:center;font-size: 12px;height: 120px;line-height: 120px;border-left: 1px solid #9FBFE3;border-right:1px solid # 9FBFE3;\">" + txt + "</li> "; strHtml += " <li style=\"background: #E6EEF7;text-align: center;font-weight: bold;height: 25px;line-height: 25px; border: 1px solid #9FBFE3;\"><input type= \"button\" value = \"返 回\" id = \"do_OK\" onclick = \"history.back();\" /> </li> "; strHtml += "</ul> "; alertFram.innerHTML = strHtml; document.body.appendChild(alertFram); document.body.appendChild(shield); this.setOpacity = function(obj, opacity) { i f(opacity >= 1) opacity = opacity / 100; try { obj.style.opacity = opacity; } catch (e) {} try { if (obj.filters.length > 0 && obj.filters("alpha")) { obj.filters("alpha").opacity = opacity * 100; } else { obj.style.filter = "alpha(opacity = \"" + (opacity * 100) + "\")"; } } catch (e) {} } var c = 0; this.doAlpha = function() { i f(++c > 20) { clearInterval(ad); return 0; } setOpacity(shield, c); } var ad = setInterval("doAlpha()", 1); this.doOk = function() { //alertFram.style.display = "none"; //shield.style.display = "none"; document.body.removeChild(alertFram); document.body.removeChild(shield); eSrc.focus(); document.body.onselectstart = function() { return true; } document.body.oncontextmenu = function() { return true; } } document.getElementById("do_OK").focus(); eSrc.blur(); document.body.onselectstart = function() { return false; } document.body.oncontextmenu = function() { return false; } } </script> </head> <body onload="AjaxAlert('不允许上传的文件类型')" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> </body> |
JS显示密码强度
密码已经是我们生活工作中必不可少的工具,但一个不安全的密码有又有可能会给我们造成不必要的损失。作为网站设计者, […]
JavaScript:世界上最被误解的语言
原文地址:<a href=”http://javascript.crockford.com/ […]
如何优化JavaScript脚本的性能
作者:ShiningRay @ Nirvana Studio 随着网络的发展,网速和机器速度的提高,越来越多的 […]
超强NB 的弹出代码,不弹都不行,3721,GOOGLE工具都拦截不了
超强NB 的弹出代码,不弹都不行,3721,GOOGLE工具都拦截不了。 在你要弹出的页面里面写上 <S […]
一个很好的无边窗口
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
<HTML> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Chromeless Window</title> <SCRIPT LANGUAGE="JScript"> /* This following code are designed and writen by Windy_sk <windy_sk@126.com> You can use it freely, but u must held all the copyright items! Special Thanks For andot */ var CW_width = 400; var CW_height = 300; var CW_top = 100; var CW_left = 100; var CW_url = "/"; var New_CW = window.createPopup(); var CW_Body = New_CW.document.body; var content = ""; var CSStext = "margin:1px;color:black; border:2px outset;border-style:expression(onmouseout=onmouseup=function(){this.style.borderStyle='outset'}, onmousedown=function(){if(event.button!=2)this.style.borderStyle='inset'});background-color:buttonface;width:16px;height:14px;font-size:12px;line-height:11px;cursor:default;"; function insert_content(){ var temp = ""; CW_Body.style.overflow = "hidden"; CW_Body.style.backgroundColor = "white"; CW_Body.style.border = "solid black 1px"; temp += "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>"; temp += "<tr style=';font-size:12px;background:#0099CC;height:20;cursor:default' ondblclick="Max.innerText=Max.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();" onmouseup='parent.drag_up(event)' onmousemove='parent.drag_move(event)' onmousedown='parent.drag_down(event)' onselectstart='return false' oncontextmenu='return false'>"; temp += "<td style='color:#ffffff;padding-left:5px'>Chromeless Window For IE6 SP1</td>"; temp += "<td style='color:#ffffff;padding-right:5px;' align=right>"; temp += "<span id=Help onclick="alert('Chromeless Window For IE6 SP1 – Ver 1.0 Code By Windy_sk Special Thanks For andot')" style=""+CSStext+"font-family:System;padding-right:2px;">?</span>"; temp += "<span id=Min onclick='parent.New_CW.hide();parent.blur()' style=""+CSStext+"font-family:Webdings;" title='Minimum'>0</span>"; temp += "<span id=Max onclick="this.innerText=this.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();" style=""+CSStext+"font-family:Webdings;" title='Maximum'>1</span>"; temp += "<span id=Close onclick='parent.opener=null;parent.close()' style=""+CSStext+"font-family:System;padding-right:2px;" title='Close'>x</span>"; temp += "</td></tr><tr><td colspan=2>"; temp += "<div>"; temp += "<object id='include' style='overflow:scroll; HEIGHT: 100%; width:"+CW_width+"';border:0px' type='text/html' data='"+CW_url+"'></object>"; temp += "</div>"; temp += "</td></tr></table>"; CW_Body.innerHTML = temp; } insert_content(); var if_max = true; function show_CW(){ window.moveTo(10000, 10000); if(if_max){ New_CW.show(CW_top, CW_left, CW_width, CW_height); if(typeof(New_CW.document.all.include)!="undefined") { New_CW.document.all.include.style.width = CW_width; New_CW.document.all.Max.innerText = "1"; } }else{ New_CW.show(0, 0, screen.width, screen.height); New_CW.document.all.include.style.width = screen.width; } } window.onfocus = show_CW; window.onresize = show_CW; // Move Window var drag_x,drag_y,draging=false function drag_move(e){ if (draging){ New_CW.show(e.screenX-drag_x, e.screenY-drag_y, CW_width, CW_height); return false; } } function drag_down(e){ if(e.button==2)return; if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height)return; drag_x=e.clientX; drag_y=e.clientY; draging=true; e.srcElement.setCapture(); } function drag_up(e){ draging=false; e.srcElement.releaseCapture(); if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height) return; CW_top = e.screenX-drag_x; CW_left = e.screenY-drag_y; } </SCRIPT> </HTML> |
Ajax基础教程
AJAX (异步 JavaScript 和 XML) 是个新产生的术语,专为描述JavaScript的两项强大 […]
mbsky的一个js
<!– var focus_width=222 var focus_height=120 v […]
Javascript的flash幻灯片
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<script> <!-- var focus_width=222 var focus_height=120 var text_height=0 var swf_height = focus_height+text_height var pics='http://www.mbsky.com/uploadImages/200661434199281.jpg|http://www.mbsky.com/uploadImages/200661434010421.jpg|http://www.mbsky.com/uploadImages/200661432548109.jpg|http://www.mbsky.com/uploadImages/200661432233047.jpg|http://www.mbsky.com/uploadImages/200661431717845.jpg|http://www.mbsky.com/uploadImages/200661431319781.jpg' var links='/InfoView/Article_6507.html|/InfoView/Article_6506.html|/InfoView/Article_6504.html|/InfoView/Article_6501.html|/InfoView/Article_6498.html|/InfoView/Article_6496.html' var texts='||||| ' document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'); document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://www.mbsky.com/images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">'); document.write('<param name="menu" value="false"><param name=wmode value="opaque">'); document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'); document.write('<embed src="http://www.mbsky.com/images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); //--> </script> |
关于一个iframe的javascript跳转自动调高
function MM_jumpMenu(targ,selObj,restore){ eval(targ+&# […]
这个javascript不错
<!– function MM_jumpMenu(targ,selObj,restore){ […]
利用JS+CSS实现圆角
为了不用图片实现圆角已经不是一天两天的事情了,IE迟迟不支持CSS3.0 如果要普及3.0估计还得好多年. 但 […]
点击复制
<script language=’javascript’> functi […]
强制关闭ie的javascript
function WindowClose() { if(document.all) { if(parseFlo […]
我的阿贾克斯之路
var g_LastID=0; var bolEXecuting=false; var g_DOM=new A […]