Javascript 如何使“长按”按钮?

Javascript 如何使“长按”按钮?,javascript,jquery,html,Javascript,Jquery,Html,我写了这段代码: <html> <head> <title>Long Press</title> </head> <body> <div id="refresh_page"> <button>long press to refresh</button> </div> </body> </html> 我想用鼠标长按按钮刷新页面,但不使用javascrip

我写了这段代码:

<html>
<head>
<title>Long Press</title>
</head>
<body>
<div id="refresh_page">
<button>long press to refresh</button>
</div>
</body>
</html>
我想用鼠标长按按钮刷新页面,但不使用javascript


有人能帮我吗?

您可以获得鼠标按下和鼠标按下之间的计数时间

这似乎是一个重复的问题:


如果你真的不想使用javascript,你可以在Flash中长时间点击

行动脚本3:

private function mouseup(e:MouseEvent):void {
    stage.removeEventListener(MouseEvent.MOUSE_UP, mouseup);
    myTimer.reset();
}
private function showInfo(event:TimerEvent):void{
    //long press code
}
private function mousedown(event:MouseEvent):void{
    myTimer.start();
}

不可能的问题=已回答

您可以使用鼠标事件如果没有JavaScript,您将无法执行此操作。嗯?你用javascript和jquery标记了你的问题,然后编辑了这个问题,没有使用javascript…哈哈!没人说这很容易。。。用javascript实现它。。。。但是没有它!QUANTUM JSno java脚本伙计,他更新了问题,我们已经说过,没有javascript就无法实现这一点。这个问题是javascript的标记。答案是好的,但不是在这个问题上。。。我已经试过了:“嘘,你真的做了不可能的事:你让我投了一个建议使用Flash的答案。我向你致敬,亲爱的先生我希望没有人认为我是在推荐Flash。。。