skip to Main Content

How to simulate real keyboard keypress in Javascript

function eng (zEvent) { var message = document.getElementById('message-textarea').value; function strip_tags(str) { str = str.toString(); return str.replace(/</?[^>]+>/gi, ''); } GM.xmlHttpRequest({ method: "POST", url: "https://example.com/ajax/translator.php", data: "message="+message, onload: function(response) { document.getElementById("message-textarea").value = strip_tags(response.responseText); }, headers: { "Content-Type": "application/x-www-form-urlencoded" } }); The code…

VIEW QUESTION
Back To Top
Search