type改成button,加个onclick事件判断下
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("#btn").click(function(){
var t=$("#text").val().length;
if(t<=10){
alert("长度不够!!")
}else{
$(this).prop("type","submit");
}
});
});
</script>
</head>
<body>
<div>
<form action="a.html" method="post">
<input type="text" id="text" />
<input type="button" value="提交查询" id="btn"/>
</form>
</div>
</body>