这是我的代码
<!DOCTYPE html>
<html>
<link rel="stylesheet"
type="text/css"
href="style.css" />
<title>mysite</title>
<head>
<image src="images.jpg" id="img1">
<image src="images2.jpg" id="img2">
<script src="jquery.js">
</script>
<div id="div1">
<p id="p1"></p>
</div>
<script>
function namething() {var name = prompt("what is your name")
document.getElementById("p1").innerHTML = "<h1>welcome, " + name + "</h1>" };
//$("#button2").click(function()
function namething2() { alert("yes")
$("div").animate({ height: 0 /*left:"250px" , opacity:"0. 5", right:"500px" */})
});
</script>
<button id="button2" onclick="namething2()">animationtest</button>
<button id="button1" onclick="namething()">click me!</button>
</head>
<script>
</script>
<body>
<p id="animate1">
</p>
<p id="center">hello</p>
</body>
</html>
返回未定义的namething2?我错过了什么?请不要问我在做什么这只是我正在测试的东西我实际上并没有尝试做某事