未捕获的SyntaxError:无效的正则表达式:/ ^(\ d {1} +(K | k){0,1}){0,1} $ /:无需重复

时间:2016-09-23 09:15:34

标签: javascript

我已经在aspx上运行但是

            function setAction()
        {           
            var idCheck = /^\w*$/;
            var bandwidthCheck = /^{\d{1}+(K|k){0,1}}{0,1}$/;

            if (document.video.eventID.value == '' || !idCheck.test(document.video.eventID.value)){
                alert("Please enter a valid Event ID");
                return false;               
            }
            else if (document.video.streamID.value == '' || !idCheck.test(document.video.streamID.value)){
                alert("Please enter a valid Stream ID");
                return false;               
            }
            else if (!bandwidthCheck.test(document.video.bandwidth.value)){
                alert("Please enter a valid Bandwidth");
                return false;               
            }               
            else if (document.video.file.value == ''){
                alert("Please select a media file");
                return false;
            }

        }

Uncaught SyntaxError:无效的正则表达式:/ ^(\ d {1} +(K | k){0,1}){0,1} $ /:无需重复 需要帮助

0 个答案:

没有答案