1
我收到一個奇怪的錯誤「無效的量詞」...有人可以幫我嗎?Javascript匹配錯誤 - 無效量詞
HTML
<input type="text" value="5+5" id="test"/>
JS
ups = {};
ups['2'] = new Array();
ups['2']['cmd'] = '#(\-|\+|\*|\/|)[0-9](,|[0-9]|)(\-|\+|\*|\/)[0-9]#gi';
var inp_val = $('#test').val();
if (inp_val.match(ups['2']['cmd']))
{
$('body').append('<br />OK');
}
http://www.jsfiddle.net/V9Euk/639/
好的,我明白了。非常感謝你! – Peter 2010-09-25 10:02:46