Home > Web Front-end > JS Tutorial > body text

js code to capture input text box content change event_form effects

WBOY
Release: 2016-05-16 18:30:30
Original
1076 people have browsed it

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!
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template