<html>
<body>
姓名: <input type="text" id="myText" placeholder="Name">
<p>点击按钮显示文本域的提示信息。</p>
<button onclick="myFunction()">点我</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myText").placeholder;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>