メニューがあるhtmlページがあります。メニューにはjavascriptがあります。このJavaScriptでは、キーボードのキー1が押された場合、最初のメニューのリンクを呼び出します。これは正常に機能していましたが、現在、要件は17〜18メニューに増えています。つまり、ユーザーが16を押した場合(つまり、キー1、次にキー6)、16番目の番号付きメニューを表示する必要があります。同時に押された2つのキーを特定するのに役立ちます。
if(event.keyCode==49)
{
self.location="pages/abc/finishgoods.jsp";
}
if(event.keyCode==50)
{
window.navigate("pages/submenu.jsp");
}
誰かがこれを検出するのを手伝ってくれませんか。私のページはIE6用であるため、jqueryを使用できません