这是我的代码,为什么它不会填充输入文本框?
<html>
<head>
<script>
function textFill() {
document.getElementById("textbox").value("Test Here");
}
</script>
</head>
<body>
<input type="text" id="textbox" />
<button type="button" onclick="textFill()">Fill Text</button>
</body>
</html>
最佳答案
尝试:
document.getElementById("textbox").value = "Test Here";
关于javascript - AJAX 填充文本框不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8056853/