first, see my example : http://jsfiddle.net/Davood/gkeAM/
i want get keyC开发者_运维技巧ode when click on link .
i want found that when clicked on link, ctrl key pressed or not ?
thanks in advance
$('a').click(function(e){
if(e.ctrlKey)
{
alert( 'You pressed ctrl key' );
}
else
{
alert( 'You clicked on link without ctrl key' );
}
return false;
});
精彩评论