JavaScript Shift + :
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
Is there a way in JavaScript to detect if the users press Shift + :? The below code does not seem to work. if (event.shiftKey && event.keyCode == 186) event.keyCode = 9;
<html xmlns="http://www.w3.org/1999/xhtml" >
<input type=text id="txtBox" onkeyup="test()">
<script>
<!--
function test() {
if (document.getElementById("txtBox").value == "+")
{
myalert();
}
}function myalert() { alert("Shift++++ :)"); }
//-->
</script>
</html>;) what will be happen you press the "shift" and "+"?:confused:
-
<html xmlns="http://www.w3.org/1999/xhtml" >
<input type=text id="txtBox" onkeyup="test()">
<script>
<!--
function test() {
if (document.getElementById("txtBox").value == "+")
{
myalert();
}
}function myalert() { alert("Shift++++ :)"); }
//-->
</script>
</html>;) what will be happen you press the "shift" and "+"?:confused: