<< Index
Event Location
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XQIB: Sample page</title>
<meta charset="UTF-8"/>
<script type="text/javascript" src="mxqueryjs/mxqueryjs.nocache.js"></script>
<script type="application/xquery">
declare sequential function local:listener($loc, $evtObj) {
b:alert($loc)
};
for $d in b:dom()//div
return b:addEventListener
($d, "onclick", local:listener#2),
</script>
</head>
<body>
<h1>Event Location</h1>
Click on one of the following words:
<div id="paragraph1">Foo</div>
<div id="paragraph2">Bar</div>
</body>
</html>