Using a regular expression with the sticky flag. JavaScript. Copy Code. var str = '#foo#'; var regex = /foo/y; regex.lastIndex = 1; regex.test(str); // true ...
確定! 回上一頁