代码驿站移动版
频道导航
HTML/Xhtml
CSS
JavaScript
HTML5
PHP教程
ASP.NET
正则表达式
AJAX
ThinkPHP
Yii
MySQL
MariaDB
Oracle
MongoDB
Redis
DedeCMS
PHPCMS
帝国CMS
WordPress
Discuz
其它CMS
Zend Studio
Sublime
Notepad
Dreamweaver
Windows
Linux
Nginx
Apache
IIS
CentOS
Ubuntu
Debian
网站优化
工具资源
PHP源码
ASP.NET源码
其它源码
图标素材
按钮素材
字体素材
DedeCMS模板
帝国CMS模板
PHPCMS模板
WordPress模板
Discuz!模板
单页模板
开发软件下载
服务器软件下载
广告投放
联系我们
版权申明
软件编程
网页前端
移动开发
数据库
服务器
脚本语言
PHP代码
JAVA代码
Python代码
Android代码
当前位置:
主页
>
网页前端
>
JavaScript代码
>
一些收集整理非常不错的JS效果代码
时间:2021-10-14 10:02:09 | 栏目:
JavaScript代码
| 点击:次
按A就会跳转到练习的网页,请按A
<SCRIPT language="JavaScript"> <!-- var hotkey=97 var destination="https://www.jb51.net" if (document.layers) document.captureEvents(Event.KEYPRESS) function backhome(e){ if (document.layers){ if (e.which==hotkey) window.location=destination } else if (document.all){ if (event.keyCode==hotkey) window.location=destination } } document.onkeypress=backhome onkeydown="javascript:onenter();" function onenter(){ if(event.keyCode==13){ alert("回车"); } } </SCRIPT>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
类似与QQ的好友/黑名单之类的树型菜单
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <script> if (!document.getElementById) document.getElementById = function() { return null; } function initializeMenu(menuId, actuatorId) { var menu = document.getElementById(menuId); var actuator = document.getElementById(actuatorId); if (menu == null || actuator == null) return; //if (window.opera) return; // I'm too tired actuator.parentNode.style.backgroundImage = "url(/images/plus.gif)"; actuator.onclick = function() { var display = menu.style.display; this.parentNode.style.backgroundImage = (display == "block") ? "url(/images/plus.gif)" : "url(/images/minus.gif)"; menu.style.display = (display == "block") ? "none" : "block"; return false; } } window.onload = function() { initializeMenu("productsMenu", "productsActuator"); initializeMenu("newPhonesMenu", "newPhonesActuator"); initializeMenu("compareMenu", "compareActuator"); } </script> <style> body { font-family: verdana, helvetica, arial, sans-serif; } #mainMenu { background-color: #EEE; border: 1px solid #CCC; color: #000; width: 203px; } #menuList { margin: 0px; padding: 10px 0px 10px 15px; } li.menubar { background: url(/images/plus.gif) no-repeat 0em 0.3em; font-size: 12px; line-height: 1.5em; list-style: none outside; } .menu, .submenu { display: none; margin-left: 15px; padding: 0px; } .menu li, .submenu li { background: url(/images/square.gif) no-repeat 0em 0.3em; list-style: none outside; } a.actuator { background-color: transparent; color: #000; font-size: 12px; padding-left: 15px; text-decoration: none; } a.actuator:hover { text-decoration: underline; } .menu li a, .submenu li a { background-color: transparent; color: #000; font-size: 12px; padding-left: 15px; text-decoration: none; } .menu li a:hover, submenu li a:hover { /*border-bottom: 1px dashed #000;*/ text-decoration: underline; } span.key { text-decoration: underline; } </style> </head> <body> <div id="mainMenu"> <ul id="menuList"> <li class="menubar"> <a href="#" id="productsActuator" class="actuator">图秀地带收藏夹</a> <ul id="productsMenu" class="menu"> <li> <a href="#" id="newPhonesActuator" class="actuator">我的好友</a> <ul id="newPhonesMenu" class="submenu"> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li> </ul> </li> <li> <a href="#" id="compareActuator" class="actuator">陌生人</a> <ul id="compareMenu" class="submenu"> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li> <li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li> </ul> </li> </ul> </li> </ul> </div> </body> </BODY> </HTML>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
超级强大的表单验证
<title>表单验证类 Validator v1.01</title> <style> body,td{font:normal 12px Verdana;color:#333333} input,textarea,select,td{font:normal 12px Verdana;color:#333333;border:1px solid #999999;background:#ffffff} table{border-collapse:collapse;} td{padding:3px} input{height:20;} textarea{width:80%;height:50px;overfmin:auto;} form{display:inline} </style> <table align="center"> <form name="theForm" id="demo" action="" method="get" onSubmit="return Validator.Validate(this,2)"> <tr> <td>真实姓名:</td><td><input name="Name" dataType="Chinese" msg="真实姓名只允许中文"></td> </tr> <tr> <td>英文名:</td><td><input name="Nick" dataType="English" require="false" msg="英文名只允许英文字母"></td> </tr> <tr> <td>主页:</td><td><input name="Homepage" require="false" dataType="Url" msg="非法的Url"></td> </tr> <tr> <td>密码:</td><td><input name="Password" dataType="SafeString" msg="密码不符合安全规则" type="password"></td> </tr> <tr> <td>重复:</td><td><input name="Repeat" dataType="Repeat" to="Password" msg="两次输入的密码不一致" type="password"></td> </tr> <tr> <td>信箱:</td><td><input name="Email" dataType="Email" msg="信箱格式不正确"></td> </tr> <tr> <td>信箱:</td><td><input name="Email" dataType="Repeat" to="Email" msg="两次输入的信箱不一致"></td> </tr> <tr> <td>QQ:</td><td><input name="QQ" require="false" dataType="QQ" msg="QQ号码不存在"></td> </tr> <tr> <td>身份证:</td><td><input name="Card" dataType="IdCard" msg="身份证号码不正确"></td> </tr> <tr> <td>年龄:</td><td><input name="Year" dataType="Range" msg="年龄必须在18~28之间" min="18" max="28"></td> </tr> <tr> <td>年龄1:</td><td><input name="Year1" require="false" dataType="Compare" msg="年龄必须在18以上" to="18" operator="GreaterThanEqual"></td> </tr> <tr> <td>电话:</td><td><input name="Phone" require="false" dataType="Phone" msg="电话号码不正确"></td> </tr> <tr> <td>手机:</td><td><input name="Mobile" require="false" dataType="Mobile" msg="手机号码不正确"></td> </tr> <tr> <td>生日:</td><td><input name="Birthday" dataType="Date" format="ymd" msg="生日日期不存在"></td> </tr> <tr> <td>邮政编码:</td><td><input name="Zip" dataType="Custom" regexp="^[1-9]\d{5}$" msg="邮政编码不存在"></td> </tr> <tr> <td>邮政编码:</td><td><input name="Zip1" dataType="Zip" msg="邮政编码不存在"></td> </tr> <tr> <td>操作系统:</td><td><select name="Operation" dataType="Require" msg="未选择所用操作系统" ><option value="">选择您所用的操作系统</option><option value="Win98">Win98</option><option value="Win2k">Win2k</option><option value="WinXP">WinXP</option></select></td> </tr> <tr> <td>所在省份:</td><td>广东<input name="Province" value="1" type="radio">陕西<input name="Province" value="2" type="radio">浙江<input name="Province" value="3" type="radio">江西<input name="Province" value="4" type="radio" dataType="Group" msg="必须选定一个省份" ></td> </tr> <tr> <td>爱好:</td><td>运动<input name="Favorite" value="1" type="checkbox">上网<input name="Favorite" value="2" type="checkbox">听音乐<input name="Favorite" value="3" type="checkbox">看书<input name="Favorite" value="4" type="checkbox"" dataType="Group" min="2" max="3" msg="必须选择2~3种爱好"></td> </tr> <td>自我介绍:</td><td><textarea name="Description" dataType="Limit" max="10" msg="自我介绍内容必须在10个字之内">中文是一个字</textarea></td> </tr> <td>自传:</td><td><textarea name="History" dataType="LimitB" min="3" max="10" msg="自传内容必须在[3,10]个字节之内">中文是两个字节t</textarea></td> </tr> <tr> <td colspan="2"><input name="Submit" type="submit" value="确定提交"><input onClick="Validator.Validate(document.getElementById('demo'))" value="检验模式1" type="button"><input onClick="Validator.Validate(document.getElementById('demo'),2)" value="检验模式2" type="button"><input onClick="Validator.Validate(document.getElementById('demo'),3)" value="检验模式3" type="button"></td> </tr> </form> </table> <script> /************************************************* Validator v1.01 code by 我佛山人 wfsr@cunite.com http://www.cunite.com *************************************************/ Validator = { Require : /.+/, Email : /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, Phone : /^((\(\d{3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}$/, Mobile : /^((\(\d{3}\))|(\d{3}\-))?13\d{9}$/, Url : /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/, IdCard : /^\d{15}(\d{2}[A-Za-z0-9])?$/, Currency : /^\d+(\.\d+)?$/, Number : /^\d+$/, Zip : /^[1-9]\d{5}$/, QQ : /^[1-9]\d{4,8}$/, Integer : /^[-\+]?\d+$/, Double : /^[-\+]?\d+(\.\d+)?$/, English : /^[A-Za-z]+$/, Chinese : /^[\u0391-\uFFE5]+$/, UnSafe : /^(([A-Z]*|[a-z]*|\d*|[-_\~!@#\$%\^&\*\.\(\)\[\]\{\}<>\?\\\/\'\"]*)|.{0,5})$|\s/, IsSafe : function(str){return !this.UnSafe.test(str);}, SafeString : "this.IsSafe(value)", Limit : "this.limit(value.length,getAttribute('min'), getAttribute('max'))", LimitB : "this.limit(this.LenB(value), getAttribute('min'), getAttribute('max'))", Date : "this.IsDate(value, getAttribute('min'), getAttribute('format'))", Repeat : "value == document.getElementsByName(getAttribute('to'))[0].value", Range : "getAttribute('min') < value && value < getAttribute('max')", Compare : "this.compare(value,getAttribute('operator'),getAttribute('to'))", Custom : "this.Exec(value, getAttribute('regexp'))", Group : "this.MustChecked(getAttribute('name'), getAttribute('min'), getAttribute('max'))", ErrorItem : [document.forms[0]], ErrorMessage : ["以下原因导致提交失败:\t\t\t\t"], Validate : function(theForm, mode){ var obj = theForm || event.srcElement; var count = obj.elements.length; this.ErrorMessage.length = 1; this.ErrorItem.length = 1; this.ErrorItem[0] = obj; for(var i=0;i<count;i++){ with(obj.elements[i]){ var _dataType = getAttribute("dataType"); if(typeof(_dataType) == "object" || typeof(this[_dataType]) == "undefined") continue; this.ClearState(obj.elements[i]); if(getAttribute("require") == "false" && value == "") continue; switch(_dataType){ case "Date" : case "Repeat" : case "Range" : case "Compare" : case "Custom" : case "Group" : case "Limit" : case "LimitB" : case "SafeString" : if(!eval(this[_dataType])) { this.AddError(i, getAttribute("msg")); } break; default : if(!this[_dataType].test(value)){ this.AddError(i, getAttribute("msg")); } break; } } } if(this.ErrorMessage.length > 1){ mode = mode || 1; var errCount = this.ErrorItem.length; switch(mode){ case 2 : for(var i=1;i<errCount;i++) this.ErrorItem[i].style.color = "red"; case 1 : alert(this.ErrorMessage.join("\n")); this.ErrorItem[1].focus(); break; case 3 : for(var i=1;i<errCount;i++){ try{ var span = document.createElement("SPAN"); span.id = "__ErrorMessagePanel"; span.style.color = "red"; this.ErrorItem[i].parentNode.appendChild(span); span.innerHTML = this.ErrorMessage[i].replace(/\d+:/,"*"); } catch(e){alert(e.description);} } this.ErrorItem[1].focus(); break; default : alert(this.ErrorMessage.join("\n")); break; } return false; } return true; }, limit : function(len,min, max){ min = min || 0; max = max || Number.MAX_VALUE; return min <= len && len <= max; }, LenB : function(str){ return str.replace(/[^\x00-\xff]/g,"**").length; }, ClearState : function(elem){ with(elem){ if(style.color == "red") style.color = ""; var lastNode = parentNode.childNodes[parentNode.childNodes.length-1]; if(lastNode.id == "__ErrorMessagePanel") parentNode.removeChild(lastNode); } }, AddError : function(index, str){ this.ErrorItem[this.ErrorItem.length] = this.ErrorItem[0].elements[index]; this.ErrorMessage[this.ErrorMessage.length] = this.ErrorMessage.length + ":" + str; }, Exec : function(op, reg){ return new RegExp(reg,"g").test(op); }, compare : function(op1,operator,op2){ switch (operator) { case "NotEqual": return (op1 != op2); case "GreaterThan": return (op1 > op2); case "GreaterThanEqual": return (op1 >= op2); case "LessThan": return (op1 < op2); case "LessThanEqual": return (op1 <= op2); default: return (op1 == op2); } }, MustChecked : function(name, min, max){ var groups = document.getElementsByName(name); var hasChecked = 0; min = min || 1; max = max || groups.length; for(var i=groups.length-1;i>=0;i--) if(groups[i].checked) hasChecked++; return min <= hasChecked && hasChecked <= max; }, IsDate : function(op, formatString){ formatString = formatString || "ymd"; var m, year, month, day; switch(formatString){ case "ymd" : m = op.match(new RegExp("^((\\d{4})|(\\d{2}))([-./])(\\d{1,2})\\4(\\d{1,2})$")); if(m == null ) return false; day = m[6]; month = m[5]--; year = (m[2].length == 4) ? m[2] : GetFullYear(parseInt(m[3], 10)); break; case "dmy" : m = op.match(new RegExp("^(\\d{1,2})([-./])(\\d{1,2})\\2((\\d{4})|(\\d{2}))$")); if(m == null ) return false; day = m[1]; month = m[3]--; year = (m[5].length == 4) ? m[5] : GetFullYear(parseInt(m[6], 10)); break; default : break; } if(!parseInt(month)) return false; month = month==12 ?0:month; var date = new Date(year, month, day); return (typeof(date) == "object" && year == date.getFullYear() && month == date.getMonth() && day == date.getDate()); function GetFullYear(y){return ((y<30 ? "20" : "19") + y)|0;} } } </script>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
漂亮的脚本日历
<Script LANGUAGE="JavaScript"> var months = new Array("一", "二", "三","四", "五", "六", "七", "八", "九","十", "十一", "十二"); var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31); var days = new Array("日","一", "二", "三","四", "五", "六"); var classTemp; var today=new getToday(); var year=today.year; var month=today.month; var newCal; function getDays(month, year) { if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28; else return daysInMonth[month]; } function getToday() { this.now = new Date(); this.year = this.now.getFullYear(); this.month = this.now.getMonth(); this.day = this.now.getDate(); } function Calendar() { newCal = new Date(year,month,1); today = new getToday(); var day = -1; var startDay = newCal.getDay(); var endDay=getDays(newCal.getMonth(), newCal.getFullYear()); var daily = 0; if ((today.year == newCal.getFullYear()) &&(today.month == newCal.getMonth())) { day = today.day; } var caltable = document.all.caltable.tBodies.calendar; var intDaysInMonth =getDays(newCal.getMonth(), newCal.getFullYear()); for (var intWeek = 0; intWeek < caltable.rows.length;intWeek++) for (var intDay = 0;intDay < caltable.rows[intWeek].cells.length;intDay++) { var cell = caltable.rows[intWeek].cells[intDay]; var montemp=(newCal.getMonth()+1)<10?("0"+(newCal.getMonth()+1)):(newCal.getMonth()+1); if ((intDay == startDay) && (0 == daily)){ daily = 1;} var daytemp=daily<10?("0"+daily):(daily); var d="<"+newCal.getFullYear()+"-"+montemp+"-"+daytemp+">"; if(day==daily) cell.className="DayNow"; else if(intDay==6) cell.className = "DaySat"; else if (intDay==0) cell.className ="DaySun"; else cell.className="Day"; if ((daily > 0) && (daily <= intDaysInMonth)) { cell.innerText = daily; daily++; } else { cell.className="CalendarTD"; cell.innerText = ""; } } document.all.year.value=year; document.all.month.value=month+1; } function subMonth() { if ((month-1)<0) { month=11; year=year-1; } else { month=month-1; } Calendar(); } function addMonth() { if((month+1)>11) { month=0; year=year+1; } else { month=month+1; } Calendar(); } function setDate() { if (document.all.month.value<1||document.all.month.value>12) { alert("月的有效范围在1-12之间!"); return; } year=Math.ceil(document.all.year.value); month=Math.ceil(document.all.month.value-1); Calendar(); } </Script> <Script> function buttonOver() { var obj = window.event.srcElement; obj.runtimeStyle.cssText = "background-color:#FFFFFF"; // obj.className="Hover"; } function buttonOut() { var obj = window.event.srcElement; window.setTimeout(function(){obj.runtimeStyle.cssText = "";},300); } </Script> <Style> Input {font-family: verdana;font-size: 9pt;text-decoration: none;background-color: #FFFFFF;height: 20px;border: 1px solid #666666;color:#000000;} .Calendar {font-family: verdana;text-decoration: none;width: 170;background-color: #C0D0E8;font-size: 9pt;border:0px dotted #1C6FA5;} .CalendarTD {font-family: verdana;font-size: 7pt;color: #000000;background-color:#f6f6f6;height: 20px;width:11%;text-align: center;} .Title {font-family: verdana;font-size: 11pt;font-weight: normal;height: 24px;text-align: center;color: #333333;text-decoration: none;background-color: #A4B9D7;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-bottom-style:1px;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;} .Day {font-family: verdana;font-size: 7pt;color:#243F65;background-color: #E5E9F2;height: 20px;width:11%;text-align: center;} .DaySat {font-family: verdana;font-size: 7pt;color:#FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;} .DaySun {font-family: verdana;font-size: 7pt;color: #FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;} .DayNow {font-family: verdana;font-size: 7pt;font-weight: bold;color: #000000;background-color: #FFFFFF;height: 20px;text-align: center;} .DayTitle {font-family: verdana;font-size: 9pt;color: #000000;background-color: #C0D0E8;height: 20px;width:11%;text-align: center;} .DaySatTitle {font-family: verdana;font-size: 9pt;color:#FF0000;text-decoration: none;background-color:#C0D0E8;text-align: center;height: 20px;width: 12%;} .DaySunTitle {font-family: verdana;font-size: 9pt;color: #FF0000;text-decoration: none;background-color: #C0D0E8;text-align: center;height: 20px;width: 12%;} .DayButton {font-family: Webdings;font-size: 9pt;font-weight: bold;color: #243F65;cursor:hand;text-decoration: none;} </Style> <table border="0" cellpadding="0" cellspacing="1" class="Calendar" id="caltable"> <thead> <tr align="center" valign="middle"> <td colspan="7" class="Title"> <a href="javaScript:subMonth();" title="上一月" Class="DayButton">3</a> <input name="year" type="text" size="4" maxlength="4" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onpaste="this.value=this.value.replace(/[^0-9]/g,'')"> 年 <input name="month" type="text" size="1" maxlength="2" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onpaste="this.value=this.value.replace(/[^0-9]/g,'')"> 月 <a href="JavaScript:addMonth();" title="下一月" Class="DayButton">4</a> </td> </tr> <tr align="center" valign="middle"> <Script LANGUAGE="JavaScript"> document.write("<TD class=DaySunTitle id=diary >" + days[0] + "</TD>"); for (var intLoop = 1; intLoop < days.length-1;intLoop++) document.write("<TD class=DayTitle id=diary>" + days[intLoop] + "</TD>"); document.write("<TD class=DaySatTitle id=diary>" + days[intLoop] + "</TD>"); </Script> </TR> </thead> <TBODY border=1 cellspacing="0" cellpadding="0" ID="calendar" ALIGN=CENTER ONCLICK="getDiary()"> <Script LANGUAGE="JavaScript"> for (var intWeeks = 0; intWeeks < 6; intWeeks++) { document.write("<TR style='cursor:hand'>"); for (var intDays = 0; intDays < days.length;intDays++) document.write("<TD class=CalendarTD onMouseover='buttonOver();' onMouseOut='buttonOut();'></TD>"); document.write("</TR>"); } </Script> </TBODY> </TABLE> <Script LANGUAGE="JavaScript"> Calendar(); </Script>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
跳动的菜单
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>模仿as效果的导航菜单</title> <style type="text/css"> <!-- a:link,a:visited { text-decoration: none; color: #666666 } a:hover { text-decoration: underline } #hor1 { position:absolute; left:320px; top:20px; width:220px; height:20px; z-index:1; background-color: #999900; } #hor2 { position:absolute; left:320px; top:40px; width:220px; height:20px; z-index:2; background-color: #FFCC00; } #hor3 { position:absolute; left:320px; top:60px; width:220px; height:20px; z-index:3; background-color: #99CC00; } #board1 { position:absolute; left:320px; top:40px; width:220px; height:120px; z-index:-100; background-color: #333333; visibility: hidden; } body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; font-weight: bold; } body { background-color: #666666; } #board2 { position:absolute; left:320px; top:60px; width:220px; height:120px; z-index:-90; background-color: #333333; visibility: hidden; } #board3 { position:absolute; width:220px; height:120px; z-index:-80; left: 320px; top: 80px; background-color: #333333; visibility: hidden; } #hor4 { position:absolute; left:320px; top:80px; width:220px; height:20px; z-index:4; background-color: #99CCCC; } #board4 { position:absolute; left:320px; top:100px; width:220px; height:120px; z-index:-70; background-color: #333333; visibility: hidden; } --> </style> <script type="text/javascript"> lastNo=0 function re(menu_no){ if(lastNo!=menu_no){ cur=menu_no+1 lastNo=menu_no rest() }else{ cur=100 } document.getElementById("board"+menu_no).style.visibility="visible" } function rest(){ for(i=1;i<=4;i++){ document.getElementById("hor"+i).style.top=20*i; document.getElementById("board"+i).style.visibility="hidden" } menu_num=4; act=1 height=120+20 speed=0; posY=0; } function huke(){ if(act==1&&cur<100){ speed=(height-posY)*0.69+speed*0.6 posY+=speed for(i=cur;i<=menu_num;i++){ document.getElementById("hor"+i).style.top=posY+(i-2)*20 } if(Math.abs(height-posY)<0.5){ for(i=cur;i<=menu_num;i++){ document.getElementById("hor"+i).style.top=height+(i-2)*20 } act=0 } setTimeout("huke()",50) } } </script> </head> <body> <div id="hor1" onclick="re(1);huke()">News</div> <div id="hor2" onclick="re(2);huke()">Populor</div> <div id="hor3" onclick="re(3);huke()">Sports</div> <div id="hor4" onclick="re(4);huke()">Woman</div> <div id="board1">1.由AS而想起Javascript2.用Jscript写ASP有没有先天性的不足?3.没有了。</div> <div id="board2">1.xhtml+css真的来了吗?2.Flash取代传统网站3.Flash何时才能连接数据库?</div> <div id="board3">1.程序员与小姐的10个相同。2.中国的程序员与中国的足球?</div> <div id="board4">1.二十一世纪最缺的是什么?人才 <a href="http://www.gamvan.com" target="_blank">http://www.gamvan.com</a> <a href="http://www.gamvan.com" target="_blank">http://www.gamvan.com</a></div> </body> </html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
经典的带阴影的可拖动的浮动层
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>MyPixbot</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v6.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; } obj.visibility=v; } } function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01 //Copyright 1998 Macromedia, Inc. All rights reserved. var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers; var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false; retVal = true; if(IE && event) event.returnValue = true; if (MM_dragLayer.arguments.length > 1) { curDrag = MM_findObj(objName); if (!curDrag) return false; if (!document.allLayers) { document.allLayers = new Array(); with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i]; for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers) with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j]; } else { if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div"); for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];} for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i]; } } curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT; curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT; curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront; curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS; curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS; curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex; curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft; curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop; curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU; curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD; curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS! document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer; if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP); } else { var theEvent = ((NS)?objName.type:event.type); if (theEvent == 'mousedown') { var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft; var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop; var maxDragZ=null; document.MM_maxZ = 0; for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i]; var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex); if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ; var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1); if (aLayer.MM_dragOk != null && isVisible) with (aLayer) { var parentL=0; var parentT=0; if (NS6) { parentLayer = aLayer.parentNode; while (parentLayer != null && parentLayer.style.position) { parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop); parentLayer = parentLayer.parentNode; } } else if (IE) { parentLayer = aLayer.parentElement; while (parentLayer != null && parentLayer.style.position) { parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop; parentLayer = parentLayer.parentElement; } } var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft); var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop); if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0; var tmpW = MM_hWidth; if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth); var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight); if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } } if (curDrag) { document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE); curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0; MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop; document.MM_curDrag = curDrag; curDrag.MM_SNAPPED=false; if(curDrag.MM_toFront) { eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1'); if (!curDrag.MM_dropBack) document.MM_maxZ++; } retVal = false; if(!NS4&&!NS6) event.returnValue = false; } } else if (theEvent == 'mousemove') { if (document.MM_curDrag) with (document.MM_curDrag) { var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft; var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop; newLeft = mouseX-MM_oldX; newTop = mouseY-MM_oldY; if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL); if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR); if (MM_bT!=null) newTop = Math.max(newTop ,MM_bT); if (MM_bB!=null) newTop = Math.min(newTop ,MM_bB); MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT; if (NS4) {left = newLeft; top = newTop;} else if (NS6){style.left = newLeft; style.top = newTop;} else {style.pixelLeft = newLeft; style.pixelTop = newTop;} if (MM_dragJS) eval(MM_dragJS); retVal = false; if(!NS) event.returnValue = false; } } else if (theEvent == 'mouseup') { document.onmousemove = null; if (NS) document.releaseEvents(Event.MOUSEMOVE); if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS if (document.MM_curDrag) with (document.MM_curDrag) { if (typeof MM_targL =='number' && typeof MM_targT == 'number' && (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+ Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) { if (NS4) {left = MM_targL; top = MM_targT;} else if (NS6) {style.left = MM_targL; style.top = MM_targT;} else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;} MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; } if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS); if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;} retVal = false; if(!NS) event.returnValue = false; } document.MM_curDrag = null; } if (NS) document.routeEvent(objName); } return retVal; } function loadwin(obj){ with(MM_findObj(obj))with(style){ filters[0].apply(); display=''; filters[0].play(); } } function cs(captionBG,bodyBG,tableBG){ oldBody=document.body; with(oldBody){ var newBody=cloneNode(); style.filter='blendtrans(duration=1)'; filters[0].apply(); with(document.styleSheets[0]){ with(rules[0].style){backgroundColor=captionBG;} with(rules[1].style){backgroundColor=bodyBG;} with(rules[2].style){backgroundColor=tableBG} } filters[0].play(); setTimeout(function(){ if(oldBody!=null){ oldBody.applyElement(newBody, "inside") oldBody.swapNode(newBody); oldBody.removeNode(true); } },1500); } } //--> </script> <style type="text/css"> <!-- .caption { font-size: 9px; color: #FFFFFF; background-color: #00CCFF; padding-left: 5px; cursor: default; font-family: "Verdana", "Arial"; border: 1px inset; } body { background-color: #f6f6f6; border: 1px inset; overflow: hidden; } table { background-color: #eeeeee; } td { font-family: "Verdana", "Arial"; font-size: 9px; border: 0px; } .win { filter:BlendTrans(duration=1) DropShadow(Color=#cccccc, OffX=3, OffY=3) alpha(opacity=90) } a { text-decoration: none; color: #003399; } a:hover { color: #FF0000; } input { font-family: "Verdana", "Arial"; font-size: 9px; border-width: 1px; } .statusbar { font-family: "Tahoma", "Verdana"; font-size: 9px; color: #999999; padding-left: 3px; } .button { border: 1px outset; text-align: center; } .navframe { padding: 5px; } --> </style> </head> <body> <div id="assist" style="position:absolute; left:15px; top:68px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('assist','',0,0,150,18,true,false,-1,-1,-1,-1,15,68,100,'',false,'')"> <table width="180" border="1" cellpadding="0" cellspacing="0"> <tr> <td class="caption">SeekAssist</td> <td width="14" align="center"><a href="#" onclick="with(MM_findObj('assistwin').style)display=display=='none'?'':'none'">%</a></td> <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('assist','','hide')">X</a></td> </tr> <tr id="assistwin"> <td height="100" colspan="3" bordercolor="#eeeeee"> </td> </tr> </table> </div> <script>loadwin('assist')</script> <div id="rank" style="position:absolute; left:15px; top:194px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('rank','',0,0,150,18,true,false,-1,-1,-1,-1,15,194,100,'',false,'')"> <table width="180" border="1" cellpadding="0" cellspacing="0"> <tr> <td class="caption">SeekRank</td> <td width="14" align="center"><a href="#" onclick="with(MM_findObj('rankwin').style)display=display=='none'?'':'none'">%</a></td> <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('assist','','inherit','rank','','hide')">X</a></td> </tr> <tr id="rankwin"> <td height="100" colspan="3" bordercolor="#eeeeee"> </td> </tr> </table> </div> <script>setTimeout("loadwin('rank')",500)</script> <div id="mycolor" style="position:absolute; left:15px; top:320px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('mycolor','',0,0,150,18,true,false,-1,-1,-1,-1,15,320,100,'',false,'')"> <table width="180" border="1" cellpadding="0" cellspacing="0"> <tr> <td class="caption">MyColor</td> <td width="14" align="center"><a href="#" onclick="with(MM_findObj('mycolorwin').style)display=display=='none'?'':'none'">%</a></td> <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('mycolor','','hide')">X</a></td> </tr> <tr id="mycolorwin"> <td height="100" colspan="3" bordercolor="#eeeeee"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td align="center"><a href="#" onclick="cs('#00CCFF','#f6f6f6','#eeeeee')">Default</a></td> </tr> <tr> <td align="center"><a href="#" onclick="cs('red','#eeccee','#eeddee')">StyleSheet#1</a></td> </tr> <tr> <td align="center"><a href="#" onclick="cs('#99ccff','#eeeeee','#ccddff')">StyleSheet#2</a></td> </tr> <tr> <td align="center"><a href="#" onclick="cs('#ff9999','#ffffff','#ffeeff')">StyleSheet#3</a></td> </tr> <tr> <td align="center"><a href="#" onclick="cs('skyblue','#eeeeee','#99ddff')">StyleSheet#4</a></td> </tr> <tr> <td align="center"><a href="#" onclick="cs('#009900','#eeffee','#ddffdd')">StyleSheet#5</a></td> </tr> </table></td> </tr> </table> </div> <script>setTimeout("loadwin('mycolor')",1000)</script> <div id="results" style="position:absolute; left:204px; top:68px; width:575px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('results','',0,0,400,18,true,false,-1,-1,-1,-1,204,68,50,'',false,'')"> <table width="570" border="1" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="caption">Results</td> <td width="12" class="button"><a href="#" onClick="with(MM_findObj('resultswin').style)display=display=='none'?'':'none'">%</a></td> <td width="12" class="button"><a href="#" onClick="MM_showHideLayers('results','','inherit')">X</a></td> </tr> </table></td> </tr> <tr> <td height="20" bordercolor="#eeeeee"><input name="url" type="text" value="http://www.google.com/search?q=ezlee" size="100"> <a href="#" onclick="mainframe.location=url.value">Search</a></td> </tr> <tr id="resultswin"> <td height="318" valign="top" class="navframe"><aiframe name="mainframe" id="mainframe" src="http://www.google.com/search?q=ezlee" width="100%" height="100%" frameborder="0" scrolling="auto"><font color="#FF0000">Welcome!</font></aiframe></td> </tr> <tr> <td height="14" class="statusbar">Ready!</td> </tr> </table> </div> <script>setTimeout("loadwin('results')",2000)</script> </body> </html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
1个非常不错的loading 效果
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> </head> <BODY STYLE="FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica"> <SCRIPT LANGUAGE="JScript"> var NUMBER_OF_REPETITIONS = 40; var nRepetitions = 0; var g_oTimer = null; function startLongProcess() { divProgressDialog.style.display = ""; resizeModal(); btnCancel.focus(); // Add a resize handler for the window window.onresize = resizeModal; // Add a warning in case anyone tries to navigate away or refresh the page window.onbeforeunload = showWarning; // // Here's where you would normally kick off a long asynchronous process // like a file download or a remote database operation. Here, we use // our "long process" to simulate this process. // continueLongProcess(); } function updateProgress(nNewPercent) { // Update our pseudo progress bar divProgressInner.style.width = (parseInt(divProgressOuter.style.width) * nNewPercent / 100)+ "px"; } function stopLongProcess() { if (g_oTimer != null) { // Clear the timer so we don't get called back an extra time window.clearTimeout(g_oTimer); g_oTimer = null; } // Hide the fake modal DIV divModal.style.width = "0px"; divModal.style.height = "0px"; divProgressDialog.style.display = "none"; // Remove our event handlers window.onresize = null; window.onbeforeunload = null; nRepetitions = 0; } function continueLongProcess() { if (nRepetitions < NUMBER_OF_REPETITIONS) { // Set the timeout somewhere between 0 and .25 seconds var nTimeoutLength = Math.random() * 250; updateProgress(100 * nRepetitions / NUMBER_OF_REPETITIONS); g_oTimer = window.setTimeout("continueLongProcess();", nTimeoutLength); nRepetitions++; } else { stopLongProcess(); } } function showWarning() { //Warn users before they refresh the page or navigate away return "Navigating to a different page or refreshing the window could cause you to lose precious data.\n\nAre you*absolutely* certain you want to do this?"; } function resizeModal() { // Resize the DIV which fakes the modality of the dialog DIV divModal.style.width = document.body.scrollWidth; divModal.style.height = document.body.scrollHeight; // Re-center the dialog DIV divProgressDialog.style.left = ((document.body.offsetWidth - divProgressDialog.offsetWidth) / 2); divProgressDialog.style.top = ((document.body.offsetHeight - divProgressDialog.offsetHeight) / 2); } </SCRIPT> <INPUT TYPE="BUTTON" VALUE="Click Me!" onclick="startLongProcess();"> <!-- BEGIN PROGRESS DIALOG --> <DIV STYLE="BORDER: buttonhighlight 2px outset; FONT-SIZE: 8pt; Z-INDEX: 4; FONT-FAMILY: Tahoma; POSITION: absolute; BACKGROUND-COLOR: buttonface; DISPLAY: none; WIDTH: 350px; CURSOR: default" ID="divProgressDialog" onselectstart="window.event.returnValue=false;"> <DIV STYLE="PADDING: 3px; FONT-WEIGHT: bolder; COLOR: captiontext; BORDER-BOTTOM: white 2px groove; BACKGROUND-COLOR: activecaption"> Downloading Requested Document </DIV> <DIV STYLE="PADDING: 5px"> Please wait while I download the document you requested. </DIV> <DIV STYLE="PADDING: 5px"> This may take several seconds. </DIV> <DIV STYLE="PADDING: 5px"> <DIV ID="divProgressOuter" STYLE="BORDER: 1px solid threedshadow; WIDTH: 336px; HEIGHT: 15px"> <DIV ID="divProgressInner" STYLE="COLOR: white; TEXT-ALIGN: center; BACKGROUND-COLOR: infobackground; MARGIN: 0px; WIDTH: 0px; HEIGHT: 13px;"></DIV> </DIV> </DIV> <DIV STYLE="BORDER-TOP: white 2px groove; PADDING-BOTTOM: 5px; PADDING-TOP: 3px; BACKGROUND-COLOR: buttonface; TEXT-ALIGN: center"> <INPUT STYLE="FONT-FAMILY: Tahoma; FONT-SIZE: 8pt" TYPE="button" ID="btnCancel" onclick="stopLongProcess();" VALUE="Cancel"> </DIV> </DIV> <!-- END PROGRESS DIALOG --> <!-- BEGIN FAKE MODAL DIV--> <DIV ID="divModal" STYLE="BACKGROUND-COLOR: white; FILTER: alpha(opacity=75); LEFT: 0px; POSITION: absolute; TOP: 0px; Z-INDEX: 3" onclick="window.event.cancelBubble=true; window.event.returnValue=false;"> </DIV> <!-- END FAKE MODAL DIV --> </body> </html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
繁简体文字转换工具
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Haao's 博客</title> <link href="style.css" rel="stylesheet" type="text/css"> </script> </head> <body> <div align="center"> <table width="750" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td align="center" bgcolor="#F4F4F4"><b>欢迎使用繁简体文字转换工具</b></td> </tr> <tr> <td align="center" bgcolor="#FFFFFF"><input type=button class="Submit" onclick=iText.value=iText.value.s2t() value='简→繁'> <input type=button class="Submit" onclick=iText.value=iText.value.t2s() value='繁→简'> <textarea cols="70" rows="8" class="transform" id="iText">欢迎使用 繁简 文本 转换</textarea></td> </tr> </table> <script> function window.onload(){ var s="万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵??亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别?i刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐?衷蓉胸亚?医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县叁参??λ?发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛?y唠?|唢唣唤唿啧啬啭啮????啸喷喽喾嗫嗬嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭????垲垴埘埙埚埝埯堑堕?G塬墙壮声壳壶?状Ρ父垂煌房浼卸徂欺挤芙卑伦备韭桢?妪妫姗姜娄娅娆娇娈娱娲娴?O婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尝尧尴尸尽层?撂虢焓袈佩鹩焖昶襻?岗岘岙岚岛岭岳岽岿?N峄峡?i峤峥峦崂崃??崭嵘?箩吾嗅蔗酃?巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并幺广庄庆庐庑库应庙庞废?鲡蘅?异弃张弥弪弯弹强归当录?ρ宄咕夺庥?忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑?\憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛?ノ翁⑿?挠挡挢挣挤挥??捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷?D昙昼?o显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦????检棂椁椟椠椤椭楼榄榇榈榉??槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧?h沩沪?m泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈?缸遣怃?济浏?夯脘芭ㄤ?煌坑刻卫凿盗颁段?榛恋尤蠼д巧?淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆?句涔鲋弯黉苈?滢滤滥滦滨滩??漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳煺熘爱爷牍牦牵牺犊犟犭状犷犸犹狈狍?A狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑?_?`玛玮环现?o玺珉珏珐珑??珲?Q琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅?}瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦?着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础?n硅硕硖硗?}?~确硷碍碛碜碱碹磙礼?t祢祯祷祸禀禄禅离秃秆种积称秽?稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛?Y筝筹签简?箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭?纯纰纱纲纳?纵纶纷纸纹纺??纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕?绗绘给绚绛络绝绞统绠绡绢绣?绥绦继绨绩绪绫?续绮绯绰绱绲绳维绵绶绷绸?绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉?缋缌缍缎缏?缑缒缓缔缕编缗缘缙缚缛缜缝?缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘??耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌?N腭腻腼腽腾膑?H舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐?Q荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼?[萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾?螨?]衅衔补衬衮袄袅?袜袭?B装裆?T裢裣裤裥褛褴襁?[见观?_规觅视觇览觉觊觋觌?`觎觏觐觑觞触觯?誉誊讠计订讣认讥讦讧讨让讪讫训议讯记?讲讳讴讵讶讷许讹论?讼讽设访诀证诂诃评诅识?诈诉诊诋诌词诎诏?译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩?诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝?谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷?k贝贞负?O贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐?P?Q赓赔赕赖?R赘赙赚赛赜赝赞?S赠赡赢赣?W赵赶趋趱趸跃跄跖跞践?Q跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩?a轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿?b辁辂较辄辅辆辇辈辉辊辋?c辍辎辏辐辑?d输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝?N酱酽酾酿释里?鉴銮錾钆钇针钉钊钋钌钍钎钏钐?钒钓钔钕?钗?钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铌铍铎?铐铑铒??铕铖铗铘铙?铛铜铝铞铟铠铡铢铣铤铥?铧铨铩铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺?铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗锘错锚锛?锝锞锟?锡锢锣锤锥锦?@锨锩锪锫锬锭键锯锰锱锲?A锴锵锶锷锸锹锺锻锼?B锾锿镀镁镂?C镄镅镆镇?D镉镊?E镌镍镎镏镐镑镒镓镔?F镖镗镘镙?G镛镜镝镞镟?H镡镢镣镤镥镦镧镨镩镪镫镬镭?I镯镰镱镲镳?J?K镶长门闩闪闫?\闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾?]阀阁阂阃阄阅阆?^阈阉阊阋阌阍阎阏阐阑阒?_阔阕阖阗?`阙阚?a队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧?韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊?F颌颍?G颏颐频?H颓颔?I颖颗题?J颚颛颜额颞颟颠颡颢?K颤颥颦颧风?r?s飑飒飓?t飕?u?v飘飙飚飞飨餍?饥?饧饨饩饪饫饬饭饮饯饰饱饲?饴饵饶饷??饺?饼饽?饿馀馁??馄馅馆馇馈?馊馋?@馍?A馏馐馑馒馓馔馕马驭驮驯驰驱?R驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂?S骄骅骆骇骈?T骊骋验?U?V骏骐骑骒骓?W?X骖骗骘?Y骚骛骜骝骞骟骠骡骢骣骤骥?Z骧髅髋髌鬓魇魉鱼??鱿?鲁鲂?鲅鲆鲇鲈??鲋?鲍鲎?鲐鲑鲒?鲔鲕????鲚鲛鲜?鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩?鲫?鲭鲮?鲰鲱鲲鲳鲴鲵鲶鲷鲸?鲺鲻鲼鲽?????鳃鳄鳅鳆鳇??鳊鳋鳌鳍鳎鳏鳐??鳓鳔鳕鳖鳗鳘鳙?鳜鳝鳞鳟??鳢?@鸟鸠鸡鸢鸣?\鸥鸦?]鸨鸩鸪鸫鸬鸭?^鸯?_鸱鸲鸳?`鸵鸶鸷鸸鸹鸺?a?b鸽鸾鸿?c鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌?d鹎鹏?e鹑?f?g?h鹕?i鹗鹘?j鹚鹛鹜?k鹞?l?m?n?o鹣鹤?p鹦鹧鹨鹩鹪鹫鹬鹭?r鹰鹱?s鹳?t鹾麦麸黄黉?d黩黪黾鼋??鼍鼗鼹齄齐齑齿龀????龃龄龅龆龇龈龉龊龋龌龙龚龛龟" var t="?f?c?h??I??|?z?G?????爿?S?R?辂??e?N?x???塘??l???I?y??於???????a???H?C??|?H???}?x???r???夥??????????t?????畜w?N??L?b?H?e???S?~???z?R????z???????A??E?f????????????键h?m?P?d??B?F?????????r?V?T?_?Q?r??Q?D??R?p???C?坐P?D?{?P??腓??c????t?????h?e?}?q????????????褶k????????烀???Q?T?^?t?A?f?钨u?R?u?P?l?s???S?d???????????????B?N???P?h三?㈧a?^?p?l???B?~??U?\?n後?????w??????`??I??h?T?J??柙??U????z吒?j?y呱???}?^????W????????O??Z???r?竞?K??数m??c?[???D??撕???u???E??讨o?F?@???????D?A?}??鲒??K??????]??????????s??|????N??P?_??|???q???显????崖????谔??溲}?蝾^?F?A?Z?Y?J?^???W?y?D??????????K??I???D??z????????????O?W?\?????????????m???e??????????m?L???票M????????Z?q?M????s?S??u?X?[???h?G?F?{?A?????n????M??V???饧?p???????????ず??????????缫L??K么?V?f?c?]?T????R???U?F?[?_?????????????????w????????贫R????n???B?Z???Y????z????????Q??????????a???@??K??v??M???T??C???|????怵???????????艏???L??U???P?_?????????o????M?n????r?Q???????????????D?]???p??Q?v???????S?????????v?R????y?z?d?[?u?P???t??f?X?]?x?\?????谍S?挑Y???o?f?r???????铒@?x????????????g??C?㈦s??l???q??O????????g??????n?????f?d???????????????????E?n?????u?????????z???????E??????x??????M?{?????春??_?g?e?W???{???????????????л?????????????h?@???斑e??]???a?r?S??t??????I??{?o?T?a???????⒏D??\?{??????y????g?I???G?????T?????Z?i???u??o?????q????Y?O?n?^?u??O?c?B?剡[????R?s?U??L??????M?]?V?E??I???E?u?t???H???z???|?l????綮`??N???t????忘c????q???N?T???????Z?C?a???F?c??糊退溜??????????犬?瞰E?w?q?N?????????M?{???b?z?s???C?J?M?i??o?I?H?^?m?????|?h?F???t?z?k?m???c?q?\?I???????a?v?????Y?T????迟墚??X?????O????????屙?b?d?W?{?A???B?V?D???????T?c?a?`?]?_?d??}???K?}?O?w?I?P?g?{?著??A??m??C??\?V?X?a?u???^?Z?a?[?A?矽?T???o??_?|?K??~?A镟?L?Y?B?[??\??A??U?x?d??N?e?Q?x?v???d??w?F?`?[?G?Z?C?Q?]?M?Q??V?S?P?a?{?\?e?B?`?Y??~?I???U?j?D?X?j????t?@?h?f?[?e??i?g?c??S?Z?R?f?o?{糸?m?u?t?q?w?v?s??w?k?o?x???????V?{??v?]???y????~???C?X???M????K?U?O?E?I?B?[??H??q?Y?f?@?x?W?L?o?k?{?j?^?g?y????C???d?^???w?c?x?m?_?p?b?y?i?K?S?d?R??I?T?^?J?C?`?U?G?Y?l?~?|?}??|????Z?D??E?????P???|????N?`?d?b?p?\?c?p?r?O?V?_?~?z?w?t?s???i????\?`?R?Q?U?y??W?_?P?T?`?b?u?w?N?P?E?g?e??u??@??????C?c?w?d?I?[??{???V?L?F??z?}??v??X??L?_??T??D?Z?s?|??t?e?v??N?????A?D?W?H???d?G??J????{?O?n?r?K???O?o?d?\?L???O?G?]?R?v???w?C?j??s????墒n?|?p?a?{????W??R??P?n?W?@?~???L??E?}??I?M??_?[?r??Y?V?{?E?y??v??N?`?A?@?I?N?槁?\??]??x?A?l?m?r??g???Q???M??|?U?U??u???????X?s??N??Q?\?D???a?r??\????m?u?U?b?d???c??M?@?h??w??^??????[?X?J??]?C?D?M?P?U?x?|?z??u?`?????J?I????????h????v?M??n??G?S???K?A?S?O?L?E?C?b?X?u?{?R?w?p?V?\?g?a?~?x?t?v?g?r?E?C??????\?D???Q????????????p?]?_?Z?V?`?a?T?d?N?f?b?O??T??Z?x??u?n???l??{?~???r??x?\?R??e?G?C?o?]?^?@?I?X??J?O?V?B?i?????q?x?{?r??t?k????v??T?P?S??V?H??l?d??Y?r????????t?≠~??|????H??A??E?v?S?B?N?F?L?J?Q?M?R?O?\??Z?V?D?U?T?E?Y?W?B?g?c?l?d?x??V?H?p?n?F?k?s?r?y????????I?????A?M?X?w?s???O?S???V?`?J?E??]?Q?x?P??W?U?b??X?f?k?g?|???????D????Z?M?V?_?S?T?W??F?]?U?p?Y?d?e?I?c?b?`?^?m?o?v???x??y??z?w??????\?@???A?H?O?o?q?p??|?_?w?^?~?\??@?M?h?`?B?t???E?m?x?d?f???z?b???w?]?u???d?S?P???i?B?y??j?w?u?????Y钜?b??Y????????Q?T?A??l?C??{?S??O?]?}?b??g?n?R?c?^??k?j??J?x?u?^??[??^?o?Z??X?`?Q????O???X??f?g????F?K??p?U?T??C?B?G???I?o?D??s??E?B??e?y?t??K?~?X?H??z????b?A??f??|?x??t??P?C?q??P?|?|?@?y??T???o?n???H?N?i??{?z???~?n?S?s?h?\????J?R?Z?u?|?H??N??e?^?Q?W?u??K?_?a?d??N?F?\?e?v??x??U?V?I??i?O??}?|?I?J???@?R??}??D?X??V?U?t??[???n?k??????y??^???\?g?S?M?N??a?O?R?C???B????h?u??|???j??Z?D?G?C??O?d?s?n???L?T?V?W?Z?\?]???J?c??e?b?g?h?`???l?[?|??Y?}??G?y?w?u??b???A????]?????U?@??T???H?D?F?I?R?X?????A?H??]?????E?U?S?[?`?h?y?r??Z?F?V?q?\?n?o?v?^?X?d?x?f?g?h?n?t?y?w??????????B??D??C??@?A?B?I?H?i?R?a?c?M?}?忸W?U?l?_?j?h?e?f?w?}?????~?D?????h???A?E?L?^?Q?R?S?Z?\?`?_?d?h?j?j?w???}???h??q??????T??????D??A??E??F??G?L?I?N?H?K?R?Q?W?^?l??k?t??v?x?o?s?}?~?z????R?S?W?Z?Y??_?g?H?z????x?|?v??w?{?A?~??R???????Q?P?G??H??E?U?T?S?K?R???_?s?j?}?\??t?q?~?????E?K?L?J?t?y?x?W?|?u?~????????E?G?T?|?O?W?V?N?U?c?Q?T?q?^?w?n?b?j?f?`?d?q?o?r?~??\??~?????????z?a???N??O?E?H?K?A?F?T??L?Y?X??a?l?s?l?[??g?w?{?q?v?m?e?F?c???????????B?L?M???I?@?Z?X?[?V?s?h?k?g?B?F?u?S?Q?O?t?f?I?d?c?????R???{???o?|?z?x???r???v?????????@???[???M?P?Z?N?]?Z?O???Y?^?o???g?A?l?i?k?????t?????????X???\?B?F?g?_?O?V?W?^?Y?Q?s?W?p?w???????????D???I?L?X?U?z?????S?Z?s?t?o?w?x?{????B?O?R?W?X?Z?[?]?e?g?_?f?b?l?r?p?x?}????????" function String.prototype.s2t(){ var k='' for(var i=0;i<this.length;i++) k+=(s.indexOf(this.charAt(i))==-1)?this.charAt(i):t.charAt(s.indexOf(this.charAt(i))) return k } function String.prototype.t2s(){ var k='' for(var i=0;i<this.length;i++) k+=(t.indexOf(this.charAt(i))==-1)?this.charAt(i):s.charAt(t.indexOf(this.charAt(i))) return k } } </script> </div> </body> </html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
无图片实现圆角框
++RunCode_BLOCK_cW6×4t++
取得页面的大小 宽高等各种信息
<body> <SCRIPT LANGUAGE="JavaScript"> function test(){ var s = ""; s += "\r\n网页可见区域宽:"+ document.body.clientWidth; s += "\r\n网页可见区域高:"+ document.body.clientHeight; s += "\r\n网页可见区域宽:"+ document.body.offsetWidth +" (包括边线的宽)"; s += "\r\n网页可见区域高:"+ document.body.offsetHeight +" (包括边线的宽)"; s += "\r\n网页正文全文宽:"+ document.body.scrollWidth; s += "\r\n网页正文全文高:"+ document.body.scrollHeight; s += "\r\n网页被卷去的高:"+ document.body.scrollTop; s += "\r\n网页被卷去的左:"+ document.body.scrollLeft; s += "\r\n网页正文部分上:"+ window.screenTop; s += "\r\n网页正文部分左:"+ window.screenLeft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的宽:"+ window.screen.width; s += "\r\n屏幕可用工作区高度:"+ window.screen.availHeight; s += "\r\n屏幕可用工作区宽度:"+ window.screen.availWidth; alert(s); } </SCRIPT> <A HREF="javascript:test()">点击我查看信息</A> </body>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
您可能感兴趣的文章:
JavaScript常见事件处理程序实例总结
Javascript的匿名函数小结
url传递的参数值中包含&时,url自动截断问题的解决方法
Javascript别踩白块儿(钢琴块儿)小游戏实现代码
兼容浏览器的js事件绑定函数(详解)
相关文章
10-19
javascript上下左右定时滚动插件
11-23
Webpack中loader打包各种文件的方法实例
11-27
Javascript实例教程(19) 使用HoTMetal(2)
10-05
javascript判断图片是否加载完成的方法推荐
11-22
在javascript中执行任意html代码的方法示例解读
JQuery
VUE
AngularJS
MSSql
MySQL
MongoDB
Redis
Linux
Tomcat
Nginx
网站首页
广告投放
联系我们
版权申明
联系站长