我的字符串:
"<SPAN style=\"COLOR: #000000; PADDING-RIGHT: 30px\">Reason 1:</SPAN> My Text Here!"
IE浏览器:
"SPANstyleCOLOR000000PADDINGRIGHT30pxReason1SPANMyTextHere"
其它浏览器:
"Reason1BankbeatingexchangeratesCompareourratestoday"
// Remove all characters, keep alphanumerical + spaces
reasonTitleSpaces = reasonTitle.replace(/[^A-Za-z0-9\s]+/g, '');
// Remove all characters, keep alphanumerical
reasonTitle = reasonTitle.replace(/[^A-Za-z0-9]+/g, '');