]<script>
//当状态改变的时候执行的函数
function handle()
{
document.getElementById('msg').innerHTML = "输入的文字为:" + document.getElementById('txt').value;
}
if(/msie/i.test(navigator.userAgent)) //ie浏览器
{
document.getElementById('txt').onpropertychange = handle;
}
else
{//非ie浏览器,比如Firefox
document.getElementById('txt').addEventListener("input", handle, false);
document.getElementById('txt').watch('a', fn);
}
function ff()
{
document.getElementById('txt').value=Math.random();
}
</script>
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