fastadmin 顶部搜索框 下拉搜索

js文件里面:

 {field: 'paytype', 
 title: "预付款类型" ,
 addclass: 'selectpage',
 operate: 'LIKE %...%'  , 
  extend: 'data-source="user/user/getorderpaytypelist"' ,
searchable: true ,
visible: false},

php文件里:

public function getorderpaytypelist() {
	$result = array("total" => $total, "rows" => array(array("id"=>'dingjin',"name"=>"定金" ),  array("id"=>"quankuan","name"=>"全款" ),  array("id"=>"tepi","name"=>"特批" )   ));
	return json($result);
}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以使用HTML、CSS和JavaScript来实现带搜索框下菜单的导航栏。以下是一个简单的实现示例: HTML代码: ``` <nav> <ul> <li><a href="#">首页</a></li> <li><a href="#">产品</a> <ul> <li><a href="#">产品1</a></li> <li><a href="#">产品2</a></li> <li><a href="#">产品3</a></li> </ul> </li> <li><a href="#">关于我们</a></li> <li> <form> <input type="text" placeholder="搜索..."> <button type="submit">搜索</button> </form> </li> </ul> </nav> ``` CSS代码: ``` nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; align-items: center; background-color: #333; } nav ul li { position: relative; } nav ul li a { display: block; padding: 10px 20px; color: #fff; text-decoration: none; } nav ul li:hover > ul { display: block; } nav ul li ul { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background-color: #333; } nav ul li ul li { position: relative; } nav ul li ul li a { display: block; padding: 10px 20px; color: #fff; text-decoration: none; } nav ul li ul li:hover > ul { display: block; } nav ul li ul ul { display: none; position: absolute; top: 0; left: 100%; min-width: 200px; background-color: #333; } nav ul li ul ul li a { display: block; padding: 10px 20px; color: #fff; text-decoration: none; } nav ul li:last-child form { display: flex; justify-content: flex-end; align-items: center; margin: 0; padding: 10px 20px; } nav ul li:last-child form input[type="text"] { width: 200px; padding: 5px; margin-right: 10px; border: none; border-radius: 5px; } nav ul li:last-child form button[type="submit"] { padding: 5px 10px; background-color: #fff; color: #333; border: none; border-radius: 5px; cursor: pointer; } ``` JavaScript代码: ``` // 使搜索框获得焦点 document.querySelector('nav ul li:last-child form input[type="text"]').focus(); ``` 使用以上代码可以实现带搜索框下菜单的导航栏。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值