效果圖如下所示:
JS實現微信彈出搜索框 多條件查詢功能的實現代碼如下所示:
<!--<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ include file="/WEB-INF/views/include/mtaglib.jsp"%>--> <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta http-equiv="Content-type" name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width"> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta content="telephone=no" name="format-detection"> <title>百望雲票</title> <link rel="stylesheet" href="css/weui.min.css"> <link rel="stylesheet" href="css/example.css"> <script src="js/jquery-1.11.1.min.js"></script> <script type="text/javascript"> </script> <style> #kongzhi{ position: relative; left: -20px; top: -30px; } .weui-dialog{ width: 400px; height: 315px; } .weui-cell__bd input{ width: 150px; } </style> </head> <body> <!-- 內容 --> <div id="container" class="container"> <div class="page input js_show"> <div class="page__hd"> </div> <div class="page__bd"> <div class="weui-cell__ft"> <a href="javascript:;" class="showIOSDialog2"> 點我彈出搜索框 點我 點我 </a> </div> </div> </div> <!--彈出層begin--> <div id="dialogs"> <div class="js_dialog" id="iosDialog2" style="opacity: 1; display: none;"> <div class="weui-mask"> </div> <div class="weui-dialog"> <div class="weui-dialog__bd"> <div id="kongzhi"> <div class="weui-cell"> <div class="weui-cell__hd"><label class="weui-label">發票代碼:</label></div> <div class="weui-cell__bd"> <input class="weui-input" placeholder="輸入發票代碼....."> </div> </div> <div class="weui-cell"> <div class="weui-cell__hd"><label class="weui-label">發票號碼:</label></div> <div class="weui-cell__bd"> <input class="weui-input" placeholder="輸入發票號碼....."> </div> </div> <div class="weui-cell"> <div class="weui-cell__hd"><label class="weui-label">買方名稱:</label></div> <div class="weui-cell__bd"> <input class="weui-input" placeholder="購買方名稱....."> </div> </div> <div class="weui-cell"> <div class="weui-cell__hd"><label for="" class="weui-label">開始日期:</label></div> <div class="weui-cell__bd"> <input class="weui-input" type="date" value=""> </div> </div> <div class="weui-cell"> <div class="weui-cell__hd"><label for="" class="weui-label">結束日期:</label></div> <div class="weui-cell__bd"> <input class="weui-input" type="date" value=""> </div> </div> </div> </div> <div class="weui-dialog__ft"> <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_default">取消</a> <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">確認</a> </div> </div> </div> </div> <!--彈出層end--> </div> </div> </body> <script type="text/javascript" class="dialog js_show"> $(function(){ var $iosDialog2 = $('#iosDialog2'); $('#dialogs').on('click', '.weui-dialog__btn', function(){ $(this).parents('.js_dialog').fadeOut(200); }); $('.showIOSDialog2').on('click', function(){ $iosDialog2.fadeIn(200); }); }); </script> </html>
以上所述是小編給大家介紹的JS實現微信彈出搜索框 多條件查詢功能,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對網站的支持!