rchg.net
当前位置:首页 >> jAvAsCript FinDinDEx >>

jAvAsCript FinDinDEx

可以用数组的indexOf函数,方法arr.indexOf(find,start); find:要找的内容,必须; start:查找开始下标,可选; 返回:查找数据所在的下标,如果没找到,返回-1 如果只要知道是否有8这个数字,直接调用arr.indexOf(8),如果返回值不为-1,说明找...

var obj = { "Sid": "19", "Food": [ null, { "Pstandard": "1", "Pname": "天目山笋干烧肉", "SkuID": "15879572", "SkuName": "天目山笋干烧肉", "SkuPrice": "28", "SkuNum": 3 } ] } obj.Food.splice(0, 1);// array.splice(index, 1) 删除...

用 IndexOf吧function find(){var objtable = document.getElementById("tbitem");var tableContent = objtable.innerHTML;var findstr = document.getElementById("aa").value;var findIndex = tableContent.indexOf(findstr);if(findIndex < 0...

网站首页 | 网站地图
All rights reserved Powered by www.rchg.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com