jQuery event.result 屬性
示例
返回上一個 click 事件的值
$("button").click(function(){
return "Hello world!";
});
$("button").click(function(event){
$("p").html(event.result);
});
自己動手試一試 »
定義和用法
event.result 屬性包含由指定事件觸發的事件處理程式的上一個/最後一個返回值。
語法
event.result
引數 | 描述 |
---|---|
事件 | 必需。 event 引數來自事件繫結函式。 |