<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>手机端实现手机键盘搜索</title>
</head>
<style>
p{height: 20px;display: block;}
</style>
<body>
<p></p><p></p><p></p><p></p><p></p>
<form action="#">
<input type="search" placeholder="爱生活" onsearch="search()"/>
</form>
</body>
</html>
<script>
function search(){
alert("asdasd")
}
</script>
效果图如下 点击搜索就会弹出信息