联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
“栏目模型字段” 搜索字段出不来,如何写才能匹配
类型:迅睿CMS 更新时间:2020-05-18 02:05:19

“栏目模型字段”新建了“文本字段” 默认的模块搜索字段出不来,如何写才能匹配

              <input class="input" onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}" name='keyword' value='{$keyword}' id='search_keyword' placeholder="此处输入查询的标准名称(标准号)" type="text"  />
 
            <button type="button"   onclick="dr_module_search('search_keyword')"  >提交查询</button>
 
          <script>
                                    // 这段js是用来执行搜索的
                                    function dr_module_search(name) {
                                        var url="{Router::search_url($params, 'keyword', 'dayruicom')}";
                                        var value = $("#"+name).val();
                                        if (value) {
                                            location.href=url.replace('dayruicom', value);
                                        } else {
                                            $("#"+name).focus()
                                            dr_tips(0, "输入关键字");
                                        }
                                        return false;
                                    }
        </script>

            


image
image

回帖