web前端|js教程
input,模糊,输入
web前端-js教程Vue 模糊查询功能
网盘系统源码,vscode js跳转函数插件,ubuntu bind9,tomcat7 内存优化,c sqlite调用,网页设计下拉框代码,dede数据库文件夹,香港动态ip服务器,订做一次接插件,前端 css 框架,搜索评论爬虫,学php还是,seo怎么刷,大厂springboot架构,金融集团网站模板,网页两边留白代码,旅游度假村模板,wordpress后台变慢,网页设计登陆页面代码,书店销售管理系统开题报告,程序站lzw
原理:原生js的search() 方法,用于检索字符串中指定的子字符串,或检索与正则表达式相匹配的子字符串。如果没有找到任何匹配的子串,则返回 -1。
0.客服系统源码,ubuntu查看文件详情,tomcat9开启远程调试,爬虫c s s,php删除指定文件的代码,无锡seo收费lzw
input输入框,模糊查询
网页源码 dream,ubuntu怎么连网络,Tomcat有了红方块,stool爬虫工具,php箱接口,什么是SEO搜索引擎排名lzw
export default { name: "HelloWorld", data() { return { searchVal: "", items: [ {name: "上海",value: "sh" }, {name: "北京",value: "bj" }, {name: "重庆",value: "cq" }, {name: "嗨嗨嗨",value: "hhh" }, {name: "海上",value: "hs" }, {name: "京都",value: "jd" } ] }; }, methods: {}, computed: { NewItems() { var _this = this; var NewItems = []; this.items.map(function(item) { if (item.name.search(_this.searchVal) != -1) {NewItems.push(item); } }); return NewItems; } }};
效果如下: