Home > Web Front-end > JS Tutorial > IE6/7/8/9 does not support the abbreviation of exec_javascript skills

IE6/7/8/9 does not support the abbreviation of exec_javascript skills

WBOY
Release: 2016-05-16 18:06:21
Original
1188 people have browsed it

As follows

Copy the code The code is as follows:

var ary = /h/('hello') ;
alert(ary);

Error reported in IE6/7/8/9
The latest versions of Firefox/Safari/Chrome/Opera all pop up "h"

The above writing method is equivalent to
Copy the code The code is as follows:

var ary = /h /.exec('hello');


That is, when using the exec method in Firefox/Safari/Chrome/Opera browsers, you can remove "exec" and use "regular direct ()" method use.
IE10 Platform Preview still does not support this abbreviation.

Related:

https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp/exec

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template