![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
web -js
linkerjunhao
这个作者很懒,什么都没留下…
展开
-
利用split()方法 得到子字符串出现的次数
原理:split() 方法用于把一个字符串分割成字符串数组。先指定子字符串为分割标志,得到分割后的字符串数组后,获取字符串数组长度,然后减一即是子字符串出现的次数。例如:此例输出4,即 0 出现的次数TryTryfunction stringAppear(){ var str="123456789 0 0 0 0 98765432原创 2016-04-18 16:59:58 · 1014 阅读 · 0 评论 -
An invalid form control with name='file[]' is not focusable.间接点击form表单的<input type="file">出现的问题
在chrome浏览器下(使用jquery),运行以下代码choose出现An invalid form control with name='file[]' is not focusable.解决办法是将显示的按钮choose添加 type属性:type=”button“具体原理未研究,在此留坑。解决方法是在stackoverflow上发现的,链接:http:/原创 2016-06-30 20:46:44 · 838 阅读 · 0 评论