var data = document.getElementById("msg").value; 是获取不到 399的。
var data = document.getElementById("msg").value; 是获取不到 399的。
为什么获取不到啊,value不就是获取“msg”的值的吗?
我要是想获取msg的值应该怎么写
我要是想获取msg的值应该怎么写
function low(){var result = document.getElementById("msg");var data = parseInt(result.innerHTML, 10);var number = Math.floor(Math.random()*41)-20;data+=number;result.innerHTML = data;}
我要是想获取msg的值应该怎么写
5楼不都给你写出来了么
222
var data = document.getElementById("msg").value //data的值为111 var data = document.getElementById("msg").innerHTML //data的值为222
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