我想通過使用jQuery將元素「事件」傳遞給JavaScript函數。使用jQuery傳遞元素事件?
INLINE:
這很容易,直接做(內聯)。
<a href="#" onclick="ToggleMinimize('Hello World', event)">Click Me</a>
使用jQuery:
但它使用jQuery你怎麼辦?
<script type="text/javascript">
<!--
function ToggleMinimize(title, e)
{
// ...various execution code would be here ... //
}
jQuery(window).load(function() {
// How do I "get at" the "event" object for the element & pass it into the function definition?
jQuery(".chatDialog-toggle-button").bind('click', ToggleMinimize);
})
-->
</script>
提前感謝您!
欣賞它......謝謝! – 2010-11-18 20:52:05