【发布时间】:2015-04-18 19:54:05
【问题描述】:
这是我的简单代码,但它似乎不起作用。 我读了很多问答,但我不知道我做错了什么?
<!DOCTYPE html>
<head>
<title>Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
function focus(){
$("#input").focus();
}
</script>
</head>
<body>
<button onClick="focus();">button</button>
<input id="input">
</body>
</html>
我确定我缺少某些东西,但我不知道它是什么,我需要这方面的任何帮助。
谢谢。
【问题讨论】: