<!DOCTYPE html>
<html>
<head>
<title>13th_test</title>
<meta charset="gb2312">
</head>
<body>
<h1>这是一个标题</h1>
<p>这是一段文字</p>
<input id="name" type="text">
<input id="job" type="text">
<button type="button" οnclick="fun()">点击这里奇迹出现</button>
<script>
function fun(name, job)
{
var name = document.getElementById("name").value;
var job = document.getElementById("job").value;
window.alert(name+ " is a " + job);
}
</script>
</body>
</html>
output: