Home >Web Front-end >JS Tutorial >js code to capture input text box content change event_form effects

js code to capture input text box content change event_form effects

WBOY
WBOYOriginal
2016-05-16 18:30:301088browse

A guy on the Internet used this method:
readonly: The text box cannot be entered.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute
]
<script> function dochg(){ document.getElementById("testId").value = "test" } setTimeout("dochg()",1000) function showValue(obj){ alert("changed value is " + obj); } </script>You can use onPropertyChange to capture text Change the event and the experiment is successful!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn