打赏

jquery判断数据类型和相同字符串不相等

 typeof object返回object对象数据类型

encodeURIComponent(str)//可把字符串作为URI 组件进行编码。

若str1和str2字符串数值相同,encodeURIComponent(str1)和encodeURIComponent(st2)返回值不一样,可用str.trim()+""处理字符串,处理后就相同了。

posted @ 2018-01-04 13:03  每天都要学一点  阅读(3587)  评论(0编辑  收藏  举报