зеркало из https://github.com/mozilla/pjs.git
20 строки
504 B
HTML
20 строки
504 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
|
|
<textarea id="testBox" readonly></textarea>
|
|
<script type="text/javascript">
|
|
//Adding focus to the textbox should trigger a spellcheck
|
|
var textbox = document.getElementById("testBox");
|
|
addEventListener("load", function() {
|
|
textbox.readOnly = false;
|
|
textbox.focus();
|
|
textbox.value = "blahblahblah";
|
|
textbox.selectionStart = textbox.selectionEnd = 0;
|
|
textbox.blur();
|
|
}, false);
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|