javascript
共 85 篇文章
水平方向的PopMenu-弹出菜单(DIV+CSS+JS)
<style type="text/css"> li ul { display: none; left: -40px; position: absolute; top: 24px; width: 490px; /*opera需要这个宽度,可根据导航条的实际宽度作调整*/ } li ul li{ display: inline; } li ul li a{ background: url(h_line.gif) no-repeat 0px 7px; color: #666666; font-weight: normal; padding: 6px; text-align: left; } li…
2008-12-15 16:32 · javascript
javascript日期选择控件
<html> <head> <title>calenderselect</title> <metahttp-equiv="Content-Type"content="text/html;charset=ISO-8859-1"/> <styletype='text/css'> body{ font-family:"Lucidasansunicode",sans-serif; font-size:12px; margin:0; padding:0; height:100%; } #basis{ display:inline; position:relative; } #calender{ pos…
2008-12-14 01:54 · javascript
javascript 实现随机数
Math对象中的方法 Math.random() 该方法返回一个0到1之间的随机数,不包括0和1。 要实现获得一个maxNumber到minNumber范围内的随机整数,实现方法如下: choNumber=maxNumber-minNumber+1; number=Math.floor(Math.random()*choNumber+minNumber) 例: 选择一个1到10之间的随机数: number=Math.floor(Math.random()*10+1); 可能出现的值有10个,最小的值为1。 选择一个2到10之间的随机数: number=Math.floor(Math.rand…
2008-12-12 09:33 · javascript
js取得cookie值的函数
由于asp的cookie是经过url编码的,所以读之前要unescape一下。 下面是我用正则的方法取cookie,包括单值和多值: /************************************************** 参数说明: sMainName Cookie名 sSubName Cookie子键名,留空表示单值Cookie **************************************************/ function GetCookie(sMainName, sSubName){ var re = new RegExp((sSubName ?…
2008-12-08 15:23 · javascript
兼容ie和火狐的js无缝八向滚动特效代码
<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4490194096475053&dt=1228720413234&lmt=1228528485&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1228720413187&url=http%3A%2F%2Fwww.corange.cn%2Farc…
2008-12-08 15:13 · javascript
IE下调试客户端JavaScript脚本
如果您的Atlas程序运行在debug模式下,那么Atlas会自动为您生成一个Debug Helper Class。 这个Debug Helper Class是一个全局的对象,名称为debug,可以在您代码的任何部位被访问到。使用这个debug对象的方法,您可以在运行时dump一个对象(以可读的形式在页面尾部显示该对象的内部状态),显示trace信息,使用断言(assertion),break到调试器等。如果Visual Studio的脚本调试器(参见下文)已经attach到了这个Internet Explorer上,那么Visual Studio的Output窗口也会显示trace信息。 …
2008-12-08 15:08 · javascript
在不刷新的情况下动态添加表格行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> </head> <body> <style type="text/c…
2008-12-08 11:49 · javascript
表格隔行换色+鼠标经过变色(ie6,ie7,ff)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> <style language="text/css"> /*第一种颜色*/ #table tr.…
2008-12-08 10:21 · javascript
table排序类,点击第一行标题可以排序
table排序类,点击第一行标题可以排序 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>table排序类,点击第一行标题可以排序 corang…
2008-12-08 10:20 · javascript
yiu简易网页调色板功能调用代码
简易网页调色板功能调用代码 colorSelect('色值输入框ID','显示色值的容器ID',event) 调用起来很简单,任何物品onClick就可以。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/h…
2008-12-08 10:13 · javascript
javascript实现换皮肤的一种思路
难点在于document.write输出html语句结构用法。。。思路在于在网页中动态加入xxx.css文件..来实现. <script language="javascript"> var styleId=1; var cssPath="style/style_switch"; document.write(’<link href="’+cssPath+styleId+’.css" type="text/css" rel="stylesheet" id="cssLink" media="screen" />’); //默认调用第一个 function styleChange(n){ var…
2008-12-07 20:11 · javascript
支持IE和火狐浏览器的加入收藏夹js代码
支持IE和火狐浏览器的加入收藏夹js代码 如果想要在opera和Firefox下支持加入收藏夹功能,只需要在连接加上rel="sidebar"即可. <script> function addfavorite() { if (document.all) { window.external.addFavorite('http://www.corange.cn,'corange.cn'); } else if (window.sidebar) { window.sidebar.addPanel('corange.cn', 'http://www.corange.cn, ""); } } </sc…
2008-12-07 20:01 · javascript
完全去除页面滚动条的方法
今天做站的时候客户要求实现网站全屏,使用JavaScript: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script language="javascript"> <!-- function fullscreen(){ window.open("/index.htm","","scrollbars=0,toolbar=0,location=0,fullscreen=1,directories=0,status=0,menubar=0,resizable=0"); } // --…
2008-12-07 02:21 · javascript
点击按钮,实现复制网址的代码
<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4490194096475053&dt=1228587520953&lmt=1228528466&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1228587520921&url=http%3A%2F%2Fwww.corange.cn%2Farc…
2008-12-07 02:19 · javascript
检测密码强度
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>密码</title> <style type="text/css"> body{ font-size:12px; font-family: Arial, Helvetica…
2008-12-07 02:15 · javascript
CNL Tree Menu Ver1.02无限级树形菜by CNLei枫岩
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn"> <head> <title>CNL Tree Menu Ver1.02 - 无限级树形菜单 Written by CNLei, 枫岩 </title> <meta http-equiv="content-type" content="te…
2008-12-07 02:15 · javascript
表格数据排序
<STYLE type=text/css>TABLE { BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #000000 2px solid; BORDER-LEFT: #000000 2px solid; BORDER-BOTTOM: #000000 2px solid; border-spacing: 0px; cell-spacing: 0px } TD { PADDING-RIGHT: 0.5em; PADDING-LEFT: 0.5em; FONT-SIZE: 10pt; PADDING-BOTTOM: 2px; PADDING-TOP: …
2008-12-07 02:14 · javascript
表格复选和复选变色效果
<style type="text/css"> <!-- .row {BACKGROUND-COLOR: expression(rowIndex%2==1?'':'#F5F5F5')} Body {FONT-SIZE: 12px; FONT-FAMILY: Arial,Verdana,sans-serif;LINE-HEIGHT: 150%;} Td {FONT-SIZE: 12px; FONT-FAMILY: Arial,Verdana,sans-serif;LINE-HEIGHT: 150%;} .tb {border-collapse: collapse} --> </style> <…
2008-12-07 02:13 · javascript
复选框问题,将选定的值在textarea显示
<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4490194096475053&dt=1228587096578&lmt=1228528459&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1228587096546&url=http%3A%2F%2Fwww.corange.cn%2Farc…
2008-12-07 02:12 · javascript
发一个选项卡动态增删的效果..
发一个选项卡动态增删的效果.. 仿126的效果,可以删除的tab http://www.corange.cn//uploadfiles/tab_81592.rar
2008-12-06 13:16 · javascript