jQuery event.resultプロパティ
サンプル
最後の click イベントの値を返します:
$("button").click(function(){
return "Hello world!";
});
$("button").click(function(event){
$("p").html(event.result);
});
return "Hello world!";
});
$("button").click(function(event){
$("p").html(event.result);
});
試してみる »
定義と使い方
event.result プロパティには、指定されたイベントによってトリガーされたイベントハンドラが返した最後の値が含まれます。
構文
event.result
| パラメータ | 説明 |
|---|---|
| event | 必須。eventパラメータはイベントバインド関数からのものです。 |
その他の拡張
jQuery イベントメソッド