Regular Expression Object An object that contains a regular expression pattern along with flags that identify how to apply the pattern.Syntax 1 re = /pattern/[flags]Syntax 2 re = new RegExp("pattern",["flags"]) Arguments reRequired. The variable name to which the regular expression pattern is assigned.patternRequired. The regular expression pattern to use. If you use Syntax 1, delimit the pattern by "/" characters. If you use Syntax 2, enclose the pattern in quotation s.flagsOptional. Enclose flag in quotation s if you use Syntax 2. Available flags, which may be combined, are: g (global search for all occurrences of pattern) i (ignore case) m (multiline search)
var sInvoker = 0;
function CloseAndSetValueToParent( sMfrSelected ){ if (sInvoker ==0){
var the_at_is_at = sMfrSelected.indexOf(":");
if (the_at_is_at != -1)
{
int stringlens=sMfrSelected.length;
//var aa=sMfrSelected.charAt(i);
for (i=0;i<=stringlens;i++)
{
var sMfrSelected2=sMfrSelected.replace(":","'");
}
window.opener.document.form1.subj.value = sMfrSelected2;
}
else
{
window.opener.document.form1.subj.value = sMfrSelected;
}
window.close();
return;
}
}
</script>
幫我找找錯
能否循環替換呀?
An object that contains a regular expression pattern along with flags that identify how to apply the pattern.Syntax 1
re = /pattern/[flags]Syntax 2
re = new RegExp("pattern",["flags"]) Arguments
reRequired. The variable name to which the regular expression pattern is assigned.patternRequired. The regular expression pattern to use. If you use Syntax 1, delimit the pattern by "/" characters. If you use Syntax 2, enclose the pattern in quotation s.flagsOptional. Enclose flag in quotation s if you use Syntax 2. Available flags, which may be combined, are: g (global search for all occurrences of pattern)
i (ignore case)
m (multiline search)