📄 event.html
字号:
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_TAB">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_RETURN"><!-- --></A><H3>
KEY_RETURN</H3>
<PRE>
public static final int <B>KEY_RETURN</B></PRE>
<DL>
<DD>Enter/回车 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_RETURN">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_ESC"><!-- --></A><H3>
KEY_ESC</H3>
<PRE>
public static final int <B>KEY_ESC</B></PRE>
<DL>
<DD>ESC 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_ESC">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_LEFT"><!-- --></A><H3>
KEY_LEFT</H3>
<PRE>
public static final int <B>KEY_LEFT</B></PRE>
<DL>
<DD>LEFT/向左方向键 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_LEFT">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_UP"><!-- --></A><H3>
KEY_UP</H3>
<PRE>
public static final int <B>KEY_UP</B></PRE>
<DL>
<DD>UP/向上方向键 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_UP">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_RIGHT"><!-- --></A><H3>
KEY_RIGHT</H3>
<PRE>
public static final int <B>KEY_RIGHT</B></PRE>
<DL>
<DD>RIGHT/向右方向键 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_RIGHT">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_DOWN"><!-- --></A><H3>
KEY_DOWN</H3>
<PRE>
public static final int <B>KEY_DOWN</B></PRE>
<DL>
<DD>DOWN/向下方向键 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_DOWN">常量字段值</A></DL>
</DL>
<HR>
<A NAME="KEY_DELETE"><!-- --></A><H3>
KEY_DELETE</H3>
<PRE>
public static final int <B>KEY_DELETE</B></PRE>
<DL>
<DD>DELETE/DEL 键值
<P>
<DL>
<DT><B>另请参见:</B><DD><A HREF="../../../constant-values.html#net.conic.prototype.Event.KEY_DELETE">常量字段值</A></DL>
</DL>
<HR>
<A NAME="observers"><!-- --></A><H3>
observers</H3>
<PRE>
public static <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>observers</B></PRE>
<DL>
<DD>当前运行进程中所有的observer的集合缓存,主要提供给@see #unloadCache()方法做释放observer使用
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>构造函数详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Event()"><!-- --></A><H3>
Event</H3>
<PRE>
public <B>Event</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>方法详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="element(net.conic.prototype.JSEvent)"><!-- --></A><H3>
element</H3>
<PRE>
public static <A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> <B>element</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event)</PRE>
<DL>
<DD>返回事件的事件源对象; <p>当前方法主要是为了屏敝不同浏览器取event源对象的差异性
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象
<DT><B>返回:</B><DD>事件源对象</DL>
</DD>
</DL>
<HR>
<A NAME="isLeftClick(net.conic.prototype.JSEvent)"><!-- --></A><H3>
isLeftClick</H3>
<PRE>
public static boolean <B>isLeftClick</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event)</PRE>
<DL>
<DD>判断事件触发时是否有点击鼠标左键;
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象
<DT><B>返回:</B><DD>true-鼠标左键被点击;false-鼠标没有点击</DL>
</DD>
</DL>
<HR>
<A NAME="pointerX(net.conic.prototype.JSEvent)"><!-- --></A><H3>
pointerX</H3>
<PRE>
public static int <B>pointerX</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event)</PRE>
<DL>
<DD>返回鼠标指示器在界面上的X座标值
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象
<DT><B>返回:</B><DD>int</DL>
</DD>
</DL>
<HR>
<A NAME="pointerY(net.conic.prototype.JSEvent)"><!-- --></A><H3>
pointerY</H3>
<PRE>
public static int <B>pointerY</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event)</PRE>
<DL>
<DD>返回鼠标指示器在界面上的Y座标值
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象
<DT><B>返回:</B><DD>int</DL>
</DD>
</DL>
<HR>
<A NAME="stop(net.conic.prototype.JSEvent)"><!-- --></A><H3>
stop</H3>
<PRE>
public static void <B>stop</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event)</PRE>
<DL>
<DD>中断指定事件的动作和结束事件的传播.
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象</DL>
</DD>
</DL>
<HR>
<A NAME="findElement(net.conic.prototype.JSEvent, net.conic.prototype.String)"><!-- --></A><H3>
findElement</H3>
<PRE>
public static <A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> <B>findElement</B>(<A HREF="../../../net/conic/prototype/JSEvent.html" title="net.conic.prototype 中的接口">JSEvent</A> event,
<A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> tagName)</PRE>
<DL>
<DD>以event源对象为起始对象,逐步向上搜索DOM树,查找与tagName相匹配的第一个的DOM对象
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>event</CODE> - 一个事件对象<DD><CODE>tagName</CODE> - 一个DOM对象的类型名称
<DT><B>返回:</B><DD>返回找到的DOM结点对象,如果没有找到则返回当前事件的源对象</DL>
</DD>
</DL>
<HR>
<A NAME="unloadCache()"><!-- --></A><H3>
unloadCache</H3>
<PRE>
public static void <B>unloadCache</B>()</PRE>
<DL>
<DD>释放当前进程中所有对象上所有事件的obsever <p>此方法在window.unload时候自动被调用,防止内存溢出
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Event.html#observe(net.conic.prototype.Object, net.conic.prototype.String, net.conic.prototype.Function, boolean)"><CODE>一个普通的observe模式的例子</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="observe(net.conic.prototype.Object, net.conic.prototype.String, net.conic.prototype.Function, boolean)"><!-- --></A><H3>
observe</H3>
<PRE>
public static void <B>observe</B>(<A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> element,
<A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> name,
<A HREF="../../../net/conic/prototype/Function.html" title="net.conic.prototype 中的类">Function</A> observer,
boolean useCapture)</PRE>
<DL>
<DD>对指定的element注册evnet的obsever(Obsever Design Pattern)
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>element</CODE> - 发生event的对象<DD><CODE>name</CODE> - event的Name。IE中所有的事件都是以on开头的,如onclick,onmouseover等,在这里只要传入click,mouseover即可。<DD><CODE>observer</CODE> - 侦听的Function对象<DD><CODE>useCapture</CODE> - 在IE中不支持此属性; true-event在被bubbling前触发; false-event在被bubbling后触发; <p><b>Example:</b></p><pre> <script language="javascript">window.onload = function(){ Event.observe($("t1"),"click",test1,false); Event.observe($("t1"),"click",test2,true); //因为useCaptur=true,所有test2比test1先执行. Event.observe($("t1"),"click",cacel,false); //第一次点击有效,之执行cacel取消所有的侦听器,第二次再点击不会再产生作用}function cacel(){ Event.unloadCache();}function test1(){ alert("1111");}function test2(){ alert("2222");}</script><table id="t1"> <tr><td id="t1">one</td></tr> <tr><td id="t2">two</td></tr></table></pre></DL>
</DD>
</DL>
<HR>
<A NAME="stopObserving(net.conic.prototype.Object, net.conic.prototype.String, net.conic.prototype.Function, boolean)"><!-- --></A><H3>
stopObserving</H3>
<PRE>
public static void <B>stopObserving</B>(<A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> element,
<A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> name,
<A HREF="../../../net/conic/prototype/Function.html" title="net.conic.prototype 中的类">Function</A> observer,
boolean useCapture)</PRE>
<DL>
<DD>停止指定的element所注册evnet的obsever
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>element</CODE> - 发生event的对象<DD><CODE>name</CODE> - event的Name。IE中所有的事件都是以on开头的,如onclick,onmouseover等,在这里只要传入click,mouseover即可。<DD><CODE>observer</CODE> - 侦听的Function对象<DD><CODE>useCapture</CODE> - 在IE中不支持此属性; true-event在被bubbling前触发; false-event在被bubbling后触发;</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Event.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../net/conic/prototype/Enumerable.html" title="net.conic.prototype 中的类"><B>上一个类</B></A>
<A HREF="../../../net/conic/prototype/Function.html" title="net.conic.prototype 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/conic/prototype/Event.html" target="_top"><B>框架</B></A>
<A HREF="Event.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | <A HREF="#field_summary">字段</A> | <A HREF="#constructor_summary">构造函数</A> | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: <A HREF="#field_detail">字段</A> | <A HREF="#constructor_detail">构造函数</A> | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -