搜索框
来源:互联网 发布:开票软件金税盘版官网 编辑:程序博客网 时间:2024/05/22 00:35
<%--搜索框wzj--%> <div class="row"> <br> <div class="col-lg-6"> <div class="input-group"> <input type="text" class="form-control" placeholder="输入产品类别名称..." id="product-content" onkeydown="onKeyDown(event,this)" /> <span class="input-group-btn"> <button class="btn btn-default" type="button" id="product-content-button" onclick="loadSearch(this)"> Go! </button> </span> </div><!-- /input-group --> </div><!-- /.col-lg-6 --> </div><!-- /.row --><%--搜索框end--%>
var loadSearch=function(ele){
var content = $('#product-content').val();// $(ele).parent("li").parent().children("li").removeAttr("class")
// $(ele).parent("li").attr("class","active")
$(".main").load("${pageContext.request.contextPath}/showroom/search/index",{"content":content})
}
<%--document.onkeydown = function(e) {--%>
<%--if (!e) {--%>
<%--e = window.event;--%>
<%--}--%>
<%--if ((e.keyCode || e.which) == 13) {--%>
<%--var content = $('#product-content').val();--%>
<%--$(".main").load("${pageContext.request.contextPath}/showroom/search/index",{"content":content});--%>
<%--}--%>
<%--};--%>
// function onKeyDown(event,ele){
// var e = event || window.event || arguments.callee.caller.arguments[0];
// if(e && e.keyCode==27){ // 按 Esc
// // 要做的事情
// }
// if(e && e.keyCode==113){ // 按 F2
// //要做的事情
// }
// if(e && e.keyCode==13){ // enter 键
// loadSearch(ele);
// }
//
// }
$('#product-content').bind('keypress',function (event) {
if(event.keyCode == "13")
{
loadSearch(this);
}
})
阅读全文
0 0
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框
- 搜索框自动搜索 -ionic
- 搜索框缓存搜索记录
- 搜索图标居中的搜索框~iOS风格搜索框
- google 搜索提示 搜索下拉框 jquery
- 推荐----没有搜索框的搜索
- 同步辅助类 java.util.concurrent.CyclicBarrier
- 添加maven私服地址
- Javascript实现继承的6种方式
- 32位与64位 CPU、编译器、操作系统、应用程序、arm和X86关系
- HBase-RPC
- 搜索框
- Linux常用命令
- Linux下的段错误(Segmentation fault)产生的原因及调试方法
- 初识sqlite
- 【Redis缓存机制】2.Redis安装和简单使用
- Centos7下安装与卸载Jdk1.8
- 构造简单的二级排序比较器
- Redis笔记(使用Jedis)
- ListView基本使用