// 搜索框的js $("#js_input").keydown(function(){ if(event.keyCode=='13'){ //13是点击后的显示 var val = $("#js_input").val(); var js_bg_input = encodeURIComponent(encodeURIComponent(val)); //用来URLcode加密 window.location.href = "http://www.baidu1.com/?key=" + js_bg_input; } });encodeURIComponent = function(uriComponent) {};
前端相关系列之搜索框
最新推荐文章于 2024-04-23 09:58:36 发布