【发布时间】:2013-10-05 19:00:25
【问题描述】:
此脚本在所有没有 IE(7/8) 的主流浏览器中都能正常运行。 你能告诉我如何用 IE 来做吗?
<!DOCTYPE html>
<html>
<head>
<script>
function change()
{
document.getElementById("red").type='password';
}
</script>
</head>
<body>
<form>
What color do you prefer?<br>
<input type="text" name="colors" id="red" value="Text">
</form>
<button type="button" onclick="change()">Change input type</button>
</body>
</html>
【问题讨论】:
标签: javascript