Records - Note-jquery-jquery in the event -1

2010-07-08  来源:本站原创  分类:Web  人气:173 

<% @ Page contentType = "text / html; charset = utf-8" language = "java" pageEncoding = "utf-8"%>
<! 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>
<title> My JSP 'event.jsp' starting page </ title>
<! -
<link rel="stylesheet" type="text/css" href="styles.css">
->
<style type="text/css" rel="stylesheet">
. Highlight (
background: # FF3300;
)
</ Style>
<script src="inc/jquery-1.3.1.js" type="text/javascript"> </ script>
<script src="inc/formValidator.js" type="text/javascript"> </ script>
<script type="text/javascript">
$ (Function () (
/ / 1. Bound event "to hide or display"
$ ("# Panel h5.head"). Bind ("click", function () (
var content = $ (this). next ("div.content");
if (content.is (": visible")) (
content.hide ();
) Else (
content.show ();
)
);)
))
</ Script>
<script type="text/javascript">
$ (Function () (
/ / 2. To change the binding event type
$ ("# Panel h5.head"). Bind ("mouseover", function () (
$ (This). Next ("div.content"). Show ();
);)
$ ("# Panel h5.head"). Bind ("moueseout", function () (
$ (This). Next ("div.content") hide ();
);)
))
</ Script>
<script type="text/javascript">
$ (Function () (
/ / 3. "Hide or show the" toggle ()
$ ("# Panel h5.head"). Toggle (function () (
$ (This). AddClass ("highlight");
$ (This). Next ("div.content"). Show ();
), Function () (
$ (This). RemoveClass ("highlight");
$ (This). Next ("div.content"). Hide ();
);)
))
</ Script>
</ Head>
<body>
<div>
<h5> What is jquery </ h5>
<div>
jquery prototype later inherited an excellent Javascript library
</ Div>
</ Div>
</ Body>
</ Html>

相关文章
  • Jquery to bind the event actually allowed to stack,,, 2010-10-16

    Jquery to bind the event actually allowed to stack,,, get linkage menu today are having this problem, because they do not care to select to add multiple bind (change) event, so he repeatedly trigger the change and error. .

  • jQuery: jQuery to expose hidden features 2010-08-17

    jQuery does not like his face shown, only those who rated the methods available to us. Other within the code in his library with a lot of cool potential method is convenient, we are waiting to be discovered. In this article, I will lead you to apprec

  • jQuery jQuery team announced the move items 2010-08-16

    Refered from: http://www.infoq.com/cn/news/2010/08/announce-jquery-mobile-project Recently, jQuery project founder John Resig released a statement : jQuery project will move into mobile devices. Will not only improve the core jQuery library to adapt

  • Jquery阻止事件冒泡 event.stopPropagation 2013-12-08

    帮朋友写了一个小效果,单击标签后标签变色并添加一个叉的图片,点击叉标签恢复原样,具体效果请点击下面的result 描述: 防止事件冒泡到DOM树上,也就是不触发的任何前辈元素上的事件处理函数. version added: 1.0 event.stopPropagation() 我们可以用 event.isPropagationStopped() 来确定这个方法是否(在那个事件对象上)调用过了. 这个方法对 trigger() 来自定义的事件同样有效. 注意,这不会阻止同一个元素上的其它事件处理

  • jQuery中参数e,event 2014-08-29

    与Flex类似,JavaScript中的事件也同样存在,捕获--触发--冒泡 三个节点.比较常见的情况是,在子DIV触发事件时,如果父DIV也监听同类事件,那么也会一起触发,并向上冒泡 jQuery对事件监听函数,都会默认传递一个参数,一般命名为event或e(非必须,也可以任意命名) e,event参数中支持下列属性: event.stopPropagation(); 停止事件冒泡的方法 event.preventDefault(); 阻止默认行为--如超链接的跳转 更简单的方式: retur

  • Collection of records common operations JQuery 2010-09-27

    Online API JQuery: http://api.jquery.com/ JQuery Select set of operations: http://www.supesoft.com/ArticleDisp.asp?ID=4825 Empty select all option :$("# selectId "). Empty (); JQuery selector Daquan: http://androider.javaeye.com/blog/478591

  • Jquery to enter the event 2008-12-11

    $('#simpleSearchProjectFilter').bind('keyup',function(event) { if(event.keyCode==13){ filterProjects(event.target.value); } });

  • Recommended Learning jQuery jquery application on the operation of the various demo form 2010-07-07

    1, application forms A change of access and loss of focus style (P142) $ (Function () ( $ (": Input"). Focus (function () (/ / Get the focus of trigger events $ (This). AddClass ("focus"); / / increase Style )). Blur (function () (/ /

  • Advanced Tutorial $ jQuery jquery image pre-loading plug-ins 2010-09-03

    http://www.117178.com/jsxiangguan/20100327/2kz8w2z5f11997579703.html <script> / * JQuery image pre-loading plug-ins. DevByCssRain.cn * / jQuery.fn.loadthumb = function (options) ( options = $. extend (( src: "" ), Options); var_self = this

  • [JQuery] Jquery receiving garbled JAVA-value problem-solving 2010-11-26

    Use JQuery post-value method has garbled the phenomenon has been resolved through the efforts is stupid way to screen in Chinese and then converted into JAVA UNICODE UNICODE and then back to the Chinese by various predecessors have a better thing? My

  • 锋利的jQuery jQuery中的DOM操作 2014-04-01

    锋利的jQuery 要点归纳(二)上 jQuery中的DOM操作,需要的朋友可以参考下. 1 查找元素节点 var $x = $("selector").text() 2 查找属性节点 var $x = $("selector").attr("property") 3 创建节点 var $x = $("html") 4 插入节点 $("selector").append() 向每个匹配的元素内部追加内容 $

  • 鋒利JQuery : jquery對象並不等於DOM對象 2012-09-13

    demo.html <!DOCTYPE html> <html> <head> <script src="../js/jquery-1.7.2.js" type="text/javascript"></script> <script type="text/javascript" src="demo.js"></script> </head

  • JQuery 1 从彩笔到熟手:认识JQuery,JQuery对象,DOM对象 2012-11-20

    http://jquery.com/ 可以看到大大的JQUERY下载地址,OK,下大的,学习嘛.小的是商用的.大的学习用的. jquery-1.8.3.js,我发布文章的时候版本是这个,那么开发就用这个呗.浏览器火狐,chrome两个. JavaScript库现在著名的就两个,一个JQuery,一个是ExtJS. 在MyEclipse里建立一个WebProject项目. 建立一个文件夹jqueryJS,把下下来的jquery包扔到里面去.在JSP页面,导入jquery包.如图所示: (注:我使用

  • Dynamic add attachments jquery (jquery table tr) 2010-09-29

    / / HTML <a href="javascript:void(0)"> [Click the Add attachment] </ a> <table cellpadding="0" cellspacing="3"> </ table> ================================================== ======= / / Add the article

  • jQuery objects and DOM objects [jQuery Development Note point (a)] 2010-12-23

    Reprinted: jQuery objects and DOM objects point [jQuery Development Note (a)] http://www.blogjava.net/jy00314996/archive/2009/02/17/255083.html Learning jQuery has been 3 days, summed up the local supply of some attention for beginners like me jQuery

  • Jquery stop event bubbling and prevent browser default behavior 2011-09-22

    Quote JavaSciprt event there are two important features: event bubbling and the target element. Event bubbling: When an element of the event is triggered when, for example, mouse click a button, the event will be the same for all elements in the ance

  • 利用jQuery的$.event.fix函数统一浏览器event事件处理 2014-02-11

    做WEB前端开发的人都知道不同的浏览器对事件的处理方式是有区别的. 比如得到触发事件的元素引用在IE浏览器下是:event.srcElement,在FF浏览器下则是:event.target,另外又比如在FF浏览器下得到光标相对页面的位置是event.pageX,而IE浏览器下的处理方式又是不一样的,当然还有一些像"阻止事件冒泡"以及"取消浏览器默认行为"等,不同浏览器也有不同的处理方式,如果我们要使JavaScript在不同的浏览器下能正常处理事件代码,就要分别进

  • jQuery源码分析之Event事件分析 2014-05-07

    对于javascript事件扩展,所有的lib都差不多.和jquery和prototype,yui和Ext,其要解决的首要问题是兼容性,所有 lib都会对event进行包裹,统一其属性解决其兼容性. 对于事件的操作无非是addEvent,fireEvent,removeEvent这三个事 件方法.一般lib都会对浏览器的提供的函数做一些扩展,解决兼容性内存泄漏等问题.第三个问题就是如何得到domReady的状态. 6.1 event的包裹 浏览器的事件兼容性是一个令人头疼的问题.IE的event

  • How to use the event.target jquery 2010-12-21

    Jquery to do with the recent front end of a project encountered a problem needs to be triggered by the elements event id, check some information in this regard to see a blog, though not many words but it is good enough, to share with you next! Quote

  • JQuery Simple Learning (4) - JQuery event 2010-12-27

    jQuery is specially designed for the event handling. -------------------- jQuery event function jQuery jQuery event handler is the core function. HTML event handler when the event occurs automatically when the called function. By the "event" (ev