随笔分类 -  JavaScript

鼠标滑过改变Div的背景色的几种发法
摘要:1.<!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 h... 阅读全文

posted @ 2009-05-27 09:12 智者生存 阅读(834) 评论(0) 推荐(0)

二级类别可以随一级类别的变化而变化的下拉选择框
摘要:<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="keywords" content="免费资料网:Power By 13886.Com"><link rel... 阅读全文

posted @ 2009-05-23 16:21 智者生存 阅读(239) 评论(0) 推荐(0)

经典的图片无缝滚动,点击向上向下按钮还可以控制方向
摘要:<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>zhouxuanmsn@hotmail.com</title></head>... 阅读全文

posted @ 2009-05-23 09:29 智者生存 阅读(472) 评论(0) 推荐(0)

用div+css实现简单下拉菜单效果
摘要:实现自定义下拉菜单,看下面吧,CSS都已经注释。在风格管理里面添加下面的CSS,直接把下面 CSS代码 复制到风格最底部即可:css代码:/*下拉菜单样式*/*{margin:0;padding:0;border:0;}#div_center { width:790px; height:23px; background:#003399; margin-left: auto;margin-right... 阅读全文

posted @ 2009-05-23 09:26 智者生存 阅读(785) 评论(0) 推荐(0)

让Flash在Firefox和IE下背景透明
摘要:<object width="425" height="344"><param name="movie" value="Flash url"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparen... 阅读全文

posted @ 2009-05-23 09:02 智者生存 阅读(162) 评论(0) 推荐(0)

比较棒的后台管理折叠菜单
摘要:<!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" xml:lang="UTF-8" lang="UTF... 阅读全文

posted @ 2009-05-13 14:43 智者生存 阅读(331) 评论(0) 推荐(0)

marquee基本语法和marquee的相关参数设置
摘要:基本语法 <marquee> ... </marquee> 移动属性的设置 ,这种移动不仅仅局限于文字,也可以应用于图片,表格等等 方向 <direction=#> #=left, right ,up ,down <marquee direction=left>从右向左移!</marquee> 方式 <bihavior=#> ... 阅读全文

posted @ 2009-05-08 13:38 智者生存 阅读(331) 评论(0) 推荐(0)

图片连续滚动代码,左右连续,上下连续不间断滚动
摘要:所有的script脚本必须放在后面,否则会出错,在utf-8的模式下请注意空格。关键字:图片循环滚动代码 图片上下滚动代码 图片左右滚动代码 图片连续滚动代码 图片向上滚动代码向上: <basehref="http://image2.sina.com.cn/gm/lineage2/whz/newwh/images/fy/images/images/ifimage/"><div i... 阅读全文

posted @ 2009-05-08 13:35 智者生存 阅读(5987) 评论(1) 推荐(0)

连续滚动图片代码
摘要:<div id="www_qpsh_com" style="overflow:hidden;height:285px;width:1000px;color:#ff0000"><table border="0" align="left" cellpadding="0" cellspacing="0" cellspace="0"><tr><td id="www... 阅读全文

posted @ 2009-05-08 13:34 智者生存 阅读(4998) 评论(1) 推荐(0)

非常棒的图片连续滚动代码
摘要:<!--//向左滚动代码开始--><style type="text/css">body{margin:0px auto; padding:0px;}ul,li{margin:0px; padding:0px;list-style:none;}.sqBorder {width:602px; height:64px; padding:10px; border:1px #000... 阅读全文

posted @ 2009-05-08 11:57 智者生存 阅读(1207) 评论(0) 推荐(0)

图片循环滚动代码[转]
摘要:图片无缝滚动代码先介绍一下它的实现思路:一个设定宽度并且隐藏超出它宽度的内容的容器demo,里面放demo1和demo2,demo1是滚动内容,demo2为demo1的直接克隆,通过不断改变demo1的scrollTop或者scrollLeft达到滚动的目的,当滚动至demo1与demo2的交界处时直接跳回初始位置,因为demo1与demo2一样,所以分不出跳动的瞬间,从而达到“无缝&... 阅读全文

posted @ 2009-05-07 17:03 智者生存 阅读(908) 评论(0) 推荐(0)

图片交替滚动
摘要:一:<center><marquee width="90%" behavior="alternate" scrollamount="3"><img src="图片1地址" border="0" onload="if(this.width>screen.width-333) {this.width=screen.width-333;this.alt='Click ... 阅读全文

posted @ 2009-05-07 16:27 智者生存 阅读(414) 评论(0) 推荐(0)

图片横向移动
摘要:<html><head><style>body{margin:0px;}ul{list-style:none; border:0; padding:0px; margin:0px;}li{list-style:none; float:left; border:0; padding:0px; margin:0px;}img{border:0px; padding:... 阅读全文

posted @ 2009-05-07 11:21 智者生存 阅读(361) 评论(0) 推荐(0)

JavaScript 图片滑动展示效果 转载自http://www.cnblogs.com/cloudgamer/
摘要:看到jQuery实例:图片展示效果后,我也想拿来试试,但我不太喜欢用框架,所以自己做了个。其中的难点在于怎么设计各个滑动对象进行想要的滑动。一开始我想的是利用滑动对象的宽度的变化来实现滑动,但实行起来发现这个只能在理想状态下实现,一般实现起来很困难。所以还是参照了实例中的方法,利用left的变化来实现滑动。 效果:1111111 2222222 3333333 1111111 2222222 33... 阅读全文

posted @ 2009-05-07 10:36 智者生存 阅读(290) 评论(0) 推荐(0)

JavaScript实现图片横向移动(转载)
摘要:<scripttype="text/javascript"defer>varmarquee_spd=25;//滚动速度,数值越小越快varrepeat=null;varobj_marquee=document.getElementById("ImgList");//本例中的<divid=ImgList>functionmarquee_init(){varobj_unit=o... 阅读全文

posted @ 2009-05-07 10:24 智者生存 阅读(730) 评论(0) 推荐(0)

div+css+js折叠菜单
摘要:http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">Div+CSS+JS树型菜单,可刷新http://www.livepo.com"> 我的网站 http://www.netany.net" target="_blank">www.netany.net http://www.... 阅读全文

posted @ 2009-04-21 11:05 智者生存 阅读(1436) 评论(0) 推荐(0)

javascript 动态添加表格行
摘要:表格部分代码如下: 第一行 第二行 第三行 动态添加表行的javascript函数如下: function addRow(){ //添加一行 var newTr = testTbl.insertRow(); //添加两列 var newTd0 = newTr.insertCell(); var newTd1 = newTr.insertCell(); //设置列内容和属性 ... 阅读全文

posted @ 2009-04-08 13:21 智者生存 阅读(377) 评论(0) 推荐(0)

js获取系统当前时间
摘要:1 阅读全文

posted @ 2009-04-08 13:15 智者生存 阅读(355) 评论(0) 推荐(0)

按回车键提交表单
摘要:要实现的主要功能是:在文本框中输入数据以后,按回车键提交(也就是说, 按回车可以搜索 , 按搜索按钮也可以搜索)步骤:注: 如果查询按钮是ImageButton控件 提交表单时用 document.getElementById("ImageButton1").click(); 阅读全文

posted @ 2009-04-08 12:58 智者生存 阅读(445) 评论(0) 推荐(0)

55种网页常用小技巧(javascript)
摘要:1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键 no 可用于table 2. 取消选取、防止复制 3. onpaste="return false" 不准粘贴 4. oncopy="return false;" oncut="return false;" 防止复制 5. ie地址栏前换成自己的图标 6. 可以在收藏夹中显... 阅读全文

posted @ 2009-03-29 11:50 智者生存 阅读(194) 评论(0) 推荐(0)