帮我找一下错呗
<script type="text/javascript">function a(){
var name=$(".m_ipt").val();
alert(name);
}
</script>
<form method="post" onsubmit="a()">
<input type="text" value="" class="m_ipt" />
<input type="submit" value="搜索" class="m_btn" />
</form>
这段代码没错吧?为什么点击搜索获取不到文本框的值;