﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava--随笔分类-javascript</title><link>http://www.blogjava.net/cssseek/category/8779.html</link><description>揽住母亲的肩头,敬父亲一杯酒,对爱的女人说“我爱你”,和另外一个男人打架,不要打女人,有一个自己的孩子,年轻的时候去漂泊,有自己的一份事业.
</description><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 21:12:40 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 21:12:40 GMT</pubDate><ttl>60</ttl><item><title>javascript事件综合</title><link>http://www.blogjava.net/cssseek/archive/2006/03/22/36840.html</link><dc:creator>cssseek</dc:creator><author>cssseek</author><pubDate>Wed, 22 Mar 2006 05:28:00 GMT</pubDate><guid>http://www.blogjava.net/cssseek/archive/2006/03/22/36840.html</guid><wfw:comment>http://www.blogjava.net/cssseek/comments/36840.html</wfw:comment><comments>http://www.blogjava.net/cssseek/archive/2006/03/22/36840.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/cssseek/comments/commentRss/36840.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cssseek/services/trackbacks/36840.html</trackback:ping><description><![CDATA[<span id="ArticleContent1_ArticleContent1_lblContent">&nbsp;
<p>javascript事件查询综合 <br />&nbsp;</p>
<p>javascript事件查询综合<br />click()&nbsp;&nbsp; 对象.click()&nbsp;&nbsp; 使对象被点击。<br />closed&nbsp;&nbsp; 对象.closed&nbsp;&nbsp; 对象窗口是否已关闭true/false<br />clearTimeout(对象) 清除已设置的setTimeout对象<br />clearInterval(对象) 清除已设置的setInterval对象<br />confirm(&quot;提示信息&quot;) 弹出确认框，确定返回true取消返回false<br />cursor:样式&nbsp; 更改鼠标样式 hand crosshair text wait help default auto e/s/w/n-resize</p>
<p>event.clientX&nbsp; 返回最后一次点击鼠标X坐标值；<br />event.clientY&nbsp; 返回最后一次点击鼠标Y坐标值；<br />event.offsetX&nbsp; 返回当前鼠标悬停X坐标值<br />event.offsetY&nbsp; 返回当前鼠标悬停Y坐标值</p>
<p>document.write(document.lastModified)&nbsp; 网页最后一次更新时间<br />document.ondblclick=x&nbsp; 当双击鼠标产生事件<br />document.onmousedown=x&nbsp; 单击鼠标键产生事件</p>
<p>document.body.scrollTop; 返回和设置当前竖向滚动条的坐标值，须与函数配合,<br />document.body.scrollLeft; 返回和设置当前横向滚动务的坐标值，须与函数配合，<br />document.title&nbsp; document.title=&quot;message&quot;; 当前窗口的标题栏文字<br />document.bgcolor document.bgcolor=&quot;颜色值&quot;; 改变窗口背景颜色<br />document.Fgcolor document.Fgcolor=&quot;颜色值&quot;; 改变正文颜色<br />document.linkcolor document.linkcolor=&quot;颜色值&quot;; 改变超联接颜色<br />document.alinkcolor document.alinkcolor=&quot;颜色值&quot;; 改变正点击联接的颜色<br />document.VlinkColor document.VlinkColor=&quot;颜色值&quot;; 改变已访问联接的颜色<br />document.forms.length 返回当前页form表单数<br />document.anchors.length 返回当前页锚的数量<br />document.links.length 返回当前页联接的数量<br />document.onmousedown=x 单击鼠标触发事件<br />document.ondblclick=x 双击鼠标触发事件<br />defaultStatus&nbsp; window.status=defaultStatus; 将状态栏设置默认显示</p>
<p>function&nbsp; function xx(){...}&nbsp; 定义函数<br />isNumeric&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 判断是否是数字<br />innerHTML&nbsp; xx=对象.innerHTML&nbsp; 输入某对象标签中的html源代码<br />innerText&nbsp; divid.innerText=xx&nbsp; 将以div定位以id命名的对象值设为XX</p>
<p>location.reload(); 使本页刷新，target可等于一个刷新的网页</p>
<p>Math.random()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 随机涵数,只能是0到1之间的数,如果要得到其它数,可以为*10,再取整<br />Math.floor(number) 将对象number转为整数，舍取所有小数<br />Math.min(1,2)&nbsp; 返回1,2哪个小<br />Math.max(1,2)&nbsp; 返回1,2哪个大</p>
<p>navigator.appName 返回当前浏览器名称<br />navigator.appVersion 返回当前浏览器版本号<br />navigator.appCodeName 返回当前浏览器代码名字<br />navigator.userAgent 返回当前浏览器用户代标志</p>
<p>onsubmit&nbsp; onsubmit=&quot;return(xx())&quot;&nbsp; 使用函数返回值<br />opener&nbsp;&nbsp; opener.document.对象&nbsp; 控制原打开窗体对象</p>
<p>prompt&nbsp;&nbsp; xx=window.prompt(&quot;提示信息&quot;,&quot;预定值&quot;); 输入语句<br />parent&nbsp;&nbsp; parent.框架名.对象 控制框架页面</p>
<p>return&nbsp;&nbsp; return false&nbsp;&nbsp; 返回值<br />random&nbsp;&nbsp; 随机参数（0至1之间）<br />reset()&nbsp;&nbsp; form.reset();&nbsp;&nbsp; 使form表单内的数据重置</p>
<p>split(&quot;&quot;)&nbsp; string.split(&quot;&quot;)&nbsp; 将string对象字符以逗号隔开<br />submit()&nbsp; form对象.submit()&nbsp; 使form对象提交数据</p>
<p>String对象的&nbsp; charAt(x)对象 反回指定对象的第多少位的字母<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lastIndexOf(&quot;string&quot;) 从右到左询找指定字符，没有返回-1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indexOf(&quot;string&quot;) 从左到右询找指定字符，没有返回-1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LowerCase()&nbsp; 将对象全部转为小写 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UpperCase()&nbsp; 将对象全部转为大写<br />substring(0,5)&nbsp; string.substring(x,x)&nbsp; 返回对象中从0到5的字符<br />setTimeout(&quot;function&quot;,time) 设置一个超时对象<br />setInterval(&quot;function&quot;,time) 设置一个超时对象</p>
<p>toLocaleString() x.toLocaleString()&nbsp; 从x时间对象中获取时间，以字符串型式存在<br />typeof(变量名)&nbsp;&nbsp; 检查变量的类型，值有：String,Boolean,Object,Function,Underfined</p>
<p>window.event.button==1/2/3 鼠标键左键等于1右键等于2两个键一起按为3<br />window.screen.availWidth 返回当前屏幕宽度(空白空间)<br />window.screen.availHeight 返回当前屏幕高度(空白空间)<br />window.screen.width&nbsp; 返回当前屏幕宽度(分辨率值)<br />window.screen.height&nbsp; 返回当前屏幕高度(分辨率值)<br />window.document.body.offsetHeight; 返回当前网页高度<br />window.document.body.offsetWidth; 返回当前网页宽度<br />window.resizeTo(0,0)&nbsp; 将窗口设置宽高<br />window.moveTo(0,0)&nbsp; 将窗口移到某位置<br />window.focus()&nbsp; 使当前窗口获得焦点<br />window.scroll(x,y) 窗口滚动条坐标，y控制上下移动，须与函数配合<br />window.open()&nbsp; window.open(&quot;地址&quot;,&quot;名称&quot;,&quot;属性&quot;) <br />&nbsp;&nbsp; 属性:toolbar(工具栏),location(地址栏),directions,status(状态栏),<br />&nbsp;&nbsp; menubar(菜单栏),scrollbar(滚动条),resizable(改变大小),&nbsp; width(宽),height(高),fullscreen(全&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 屏),scrollbars(全屏时无滚动条无参 数,channelmode(宽屏),left(打开窗口x坐标),top(打开窗口y坐标)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; window.location = 'view-source:' + window.location.href&nbsp; 应用事件查看网页源代码;</p>
<p><br />a=new Date();&nbsp; //创建a为一个新的时期对象<br />y=a.getYear(); //y的值为从对象a中获取年份值 两位数年份<br />y1=a.getFullYear(); //获取全年份数 四位数年份<br />m=a.getMonth();&nbsp; //获取月份值<br />d=a.getDate();&nbsp; //获取日期值<br />d1=a.getDay();&nbsp; //获取当前星期值<br />h=a.getHours();&nbsp; //获取当前小时数<br />m1=a.getMinutes(); //获取当前分钟数<br />s=a.getSeconds(); //获取当前秒钟数</p>
<p><br />对象.style.fontSize=&quot;文字大小&quot;;<br />单位：mm/cm/in英寸/pc帕/pt点/px象素/em文字高<br />1in=1.25cm<br />1pc=12pt<br />1pt=1.2px(800*600分辩率下)</p>
<p>文本字体属性：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontSize大小<br />&nbsp;family字体<br />&nbsp;color颜色<br />&nbsp;fontStyle风格，取值为normal一般,italic斜体,oblique斜体且加粗<br />&nbsp;fontWeight加粗,取值为100到900不等,900最粗,light,normal,bold<br />&nbsp;letterSpacing间距,更改文字间距离,取值为,1pt,10px,1cm<br />&nbsp;textDecoration:文字修饰;取值,none不修饰,underline下划线,overline上划线<br />&nbsp;background:文字背景颜色,<br />&nbsp;backgroundImage:背景图片,取值为图片的插入路径</p>
<p><br />点击网页正文函数调用触发器：</p>
<p>1.onClick 当对象被点击<br />2.onLoad 当网页打开,只能书写在body中<br />3.onUnload 当网页关闭或离开时,只能书写在body中<br />4.onmouseover 当鼠标悬于其上时<br />5.onmouseout 当鼠标离开对象时<br />6.onmouseup 当鼠标松开<br />7.onmousedown 当鼠标按下键<br />8.onFocus 当对象获取焦点时<br />9.onSelect 当对象的文本被选中时<br />10.onChange 当对象的内容被改变<br />11.onBlur 当对象失去焦点<br />onsubmit=return(ss())表单调用时返回的值</p>
<p>直线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:1x solid black<br />虚线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:1x dotted black<br />点划线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:2x dashed black<br />双线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:5x double black<br />槽状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:1x groove black<br />脊状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-bottom:1x ridge black</p>
<p><br />1.边缘高光glow(color=颜色,strength=亮光大小)&lt;br&gt;<br />2.水平翻转fliph() 使对象水平翻转180度&lt;br&gt;<br />3.垂直翻转flipv() 使对象垂直翻转180度&lt;br&gt;<br />4.对象模糊blur(add=true/false direction=方向 strength=强度)<br />&nbsp;add指定是否按印象画派进行模糊direction模糊方向strength模糊强度<br />5.对象透明alpha(opaction=0-100,finishopacity=0-100,style=0/1/2/3)<br />&nbsp;opaction对象整体不透明值finishopacity当对象利用了渐透明时该项指定结束透明位置的不透明值style指定透明方式0为整体透明，1为线型透明，2为圆型透明，3为矩形透明<br />6.去除颜色chroma(color=颜色值)使对象中颜色与指定颜色相同区域透明<br />7.建立阴影dropshadow(color=阴影颜色,offx=水平向左偏离像素,offy=水平向下偏离像素)<br />8.去色gray()使对象呈灰度显示<br />9.负片效果invert()使对象呈底片效果<br />10.高光light()使对象呈黑色显示<br />11.遮盖mask(color=颜色)使整个对象以指定颜色进行蒙板一次</p>
<p>opacity 表透明度水平.0~100,0表全透明,100表完全不透明<br />finishopacity表想要设置的渐变透明效果.0~100.<br />style 表透明区的形状.0表统一形状.1表线形.2表放射形.3表长方形.<br />startx.starty表渐变透明效果的开始时X和Y坐标.<br />finishx,finishy渐变透明效果结束时x,y 的坐标.<br />add有来确定是否在模糊效果中使有原有目标.值为0,1.0表&quot;否&quot;,1表&quot;是&quot;.<br />direction设置模糊的方向.0度表垂直向上,45度为一个单位.默认值是向左270度.left,right,down,up.<br />strength 只能用整数来确定.代表有多少个像素的宽度将受到模糊影响.默认是5个.<br />color要透明的颜色.<br />offx,offy分别是x,y 方向阴影的偏移量.<br />positive指投影方式.0表透明像素生成阴影.1表只给出不透明像素生成阴影..</p>
<p>AddAmbient:加入包围的光源.<br />AddCone:加入锥形光源.<br />AddPoint加入点光源<br />Changcolor:改变光的颜色．<br />Changstrength:改变光源的强度．<br />Clear:清除所有的光源．<br />MoveLight:移动光源．</p>
<p>freq是波纹的频率，在指定在对象上一区需要产生多少个完事的波纹．<br />lightstrength可对于波纹增强光影的效果．显著0~100正整数，正弦波开始位置是0~360度．0表从0度开始，25表从90度开始．<br />strength表振幅大小．</p>
<p><br />hand&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:hand&quot;<br />crosshair&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:crosshair&quot;<br />text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:text&quot;<br />wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:wait&quot;<br />default&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:default&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:help&quot;<br />e-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:e-resize&quot;<br />ne-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:ne-resize&quot;<br />n-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:n-resize&quot;<br />nw-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:nw-resize&quot;<br />w-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:w-resize&quot;<br />s-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:s-resize&quot;<br />sw-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:sw-resize &quot;<br />se-resize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:se-resize&quot;<br />auto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=&quot;cursor:auto&quot; <br /></p>
</span><img src ="http://www.blogjava.net/cssseek/aggbug/36840.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cssseek/" target="_blank">cssseek</a> 2006-03-22 13:28 <a href="http://www.blogjava.net/cssseek/archive/2006/03/22/36840.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>