脚 本 之 家 www.jb51.net
页面导航:  不限条件-->event
本地搜索:
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">    <mx:Button x="144" y="190" label="Button">        <mx:click>&nb...
http://www.jb51.net//article/14553.htm
event的某些属性只对特定的事件有意义。比如,fromElement 和 toElement 属性只对 onmouseover 和 onmouseout 事件有意义。下面的例子检查鼠标是否在链接上单击,并且,如果shift键被按下,就取消链接的跳转。<HTML><HEAD><TITLE>Cancels Links</TITLE><SCRIPT LANGUAGE="JScript">...function cancelLink()&nb...
http://www.jb51.net//article/14296.htm
网上搜来的,看样子不错,记一笔。//------------------------------------// heavily based on the Quirksmode addEvent contest winner, John Resig// addEventfunction addEvent(obj,type,fn){    if(obj.addEventListener) obj.addEventListener...
http://www.jb51.net//article/14085.htm
// written by Dean Edwards, 2005// with input from Tino Zijdel, Matthias Miller, Diego Perini// http://dean.edwards.name/weblog/2005/10/add-event/function addEvent(element, type, handler) {  if&n...
http://www.jb51.net//article/13583.htm
案例3:熟悉tween以及tweenEvent的运用说明:点击标签载入特定的图片说明(其实是一个mc,只是坐标不同),同时还有渐隐渐现效果,没做loading,可能载入会有点慢。演示:http://www.live-my-life-with-yuyi.com/as3_cases/dynamic_with_events/代码:初始化,给一些变量赋值[code]import fl.transitions.Tween; import fl.transitions.easing.*; import fl.transitions.TweenEvent;&...
http://www.jb51.net//article/13141.htm
使用attachEvent对同一事件进行多次绑定,这是解决事件函数定义冲突的重要方法。但是在IE中,函数内的this指针并没有指向被绑定元素,而是function对象,在应用中,这是很难受的一件事,如果试图用局部变量传送元素,会因为闭包而引起内存泄漏。那么,我们应该如何解决这一难题呢?   我给Function添加了原型方法“bindNode”,在这个方法里,根据传送过来的元素,进行全局性存储转换,然后返回经过封装的函数,使用call方法来进行属主转换。<html><body><button id=btTest>tes...
http://www.jb51.net//article/10984.htm
Event篇1,关于event的用法存在问题:IE中可以直接使用event对象,但是Mozilla不可以直接使用。例如: IE ONLY <input type="button" value="clickMe" onclick="doIt()"><script language="javascript">    function doIt(){        alert(e...
http://www.jb51.net//article/10970.htm
比较好的解决办法可以用作用域,比较下下面的变量str在作用域内和作用域外的值[code]<input id="button1" type="button" value="按我" /> <script language="javascript"> window.onload=function(){     var obj=document.getElementById("button1");    &nb...
http://www.jb51.net//article/10032.htm
第一件事情.this 指钟是JavaScript语言中的一个特殊指钟,他在代码运行时,指向调用this语句的当前对象.如果是事件绑定函数,则指向被绑定的元素本身.<script type="text/javascript">//by Go_Rush(阿舜) from  http://ashun.cnblogs.com/alert(this===window)  //true  直接调用的时候,指向window本身var gorush={   &...
http://www.jb51.net//article/9399.htm
使用attachEvent对同一事件进行多次绑定,这是解决事件函数定义冲突的重要方法。但是在IE中,函数内的this指针并没有指向被绑定元素,而是function对象,在应用中,这是很难受的一件事,如果试图用局部变量传送元素,会因为闭包而引起内存泄漏。那么,我们应该如何解决这一难题呢?    我给Function添加了原型方法“bindNode”,在这个方法里,根据传送过来的元素,进行全局性存储转换,然后返回经过封装的函数,使用call方法来进行属主转换。[html]<html> <body> <butt...
http://www.jb51.net//article/9246.htm
[code]Array.prototype.inArray = function (value) {     var i;     for (i=0; i < this.length; i++) {         if (this[i] === value)&n...
http://www.jb51.net//article/8932.htm
共有:19/10,当前1/2页  [首页] [上一页] 1 2 [下一页]  [尾页] 转到: