<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta charset="UTF-8">
<script type="text/javascript" src="scripts/jquery.js"></script>
</head>
<body>
<div id="div1">A</div>
<div id="div2">B</div>
<div id="div3">ClickMe</div>
<hr>
<p id="debugText"></p>
<script type="text/javascript">
function setContent(param){
if(param){
alert("param Yes:"+param);
////////alert((param).toSource());
var s=typeof(param) + " :\n";
for( var i in param ) { s+=i;s+=":";s+=param[i];s+="\n"; }
$("p#debugText").html("<textarea rows='30' cols='100' >" + s + "</textarea>");
}else{
alert("param No:"+param);
}
//所有 div 内部设置一个 span 标签
var $divs = $("div");
$divs.html("<span>广州小蛮腰</span>");
}
$("#div3").click(setContent);
</script>
</body>
</html>
object :
originalEvent:[object MouseEvent]
type:click
isDefaultPrevented:function J(){return!1}
timeStamp:1508150364486
jQuery1710832921801739421:true
toElement:null
screenY:147
screenX:127
pageY:57
pageX:45
offsetY:12
offsetX:37
fromElement:null
clientY:57
clientX:45
buttons:0
button:0
which:1
view:[object Window]
target:[object HTMLDivElement]
shiftKey:false
relatedTarget:null
metaKey:false
eventPhase:2
currentTarget:[object HTMLDivElement]
ctrlKey:false
cancelable:true
bubbles:true
altKey:false
srcElement:[object HTMLDivElement]
relatedNode:undefined
attrName:undefined
attrChange:undefined
delegateTarget:[object HTMLDivElement]
data:null
handleObj:[object Object]
preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)}
stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)}
stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()}
isPropagationStopped:function J(){return!1}
isImmediatePropagationStopped:function J(){return!1}