是否可以在JavaScript(或jQuery)中实现"长按"?怎么样?
alt text http://androinica.com/wp-content/uploads/2009/11/longpress_options.png
HTML
<a href="" title="">Long press</a>
Run Code Online (Sandbox Code Playgroud)
JavaScript的
$("a").mouseup(function(){
// Clear timeout
return false;
}).mousedown(function(){
// Set timeout
return false;
});
Run Code Online (Sandbox Code Playgroud)