Simulate press key of keyboard when click on button
Simulate press key of keyboard when click on button
Hello,
After much research I request the help of the community jquery
I want to use jquery to simulate the keystroke by pressing a button that will fill a text input
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
lang="fr" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="
https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#press_keyboard").click(function(){
//simulate press key escape or other keys of keyboard in #input_test
// i wont use $("#input_test").val();
});
});
</script>
</head>
<body>
<input type="text" id="input_test">
<button class="" type='button' id='press_keyboard' >press keyboard</button>
</body>
</html>
Topic Participants
vincentdebrest
jakecigar