jquery - Javascript code's dfferent behaviour -
i have piece of code
widgetid = "a.b"; func= function(widgetid, tableid, primarycolsearchkey) { widgetid = test(widgetid); } test= function(id) { id = id.replace(/\./g, "\\.").replace(/ /g, "\\ ").replace(/\(/g, "\\(").replace(/\)/g, "\\)"); return id.replace(/\ /g, "\\ "); }
if call in program returns a\\.b
, if run w3schools website returns a\.b
in ie browser.
can explain why, want return a\.b
in code.
Comments
Post a Comment