The JS single reference is replaced by a dual quotation number, and the double-quotes replace the implementation method of single quotation marks.

1. Double quotes replacement into single quotes

Var _adrobj = json.stringify (address) .Replace (/ \ “/ g, “‘”); ps: var A = {a: 1, b: 2}; json.stringify (a) =====> {“a”: 1, “b”: 2} “
  2. Single quotation replacement into double quotes  

var _nstr = _adrdata.replace (/ ‘/ g, ‘”‘); ps: var json = json.parse (_nstr); if (json.storedelivery == 0) {msgbox ($. msg.outdistributeaddress); Return;} Function EscapeHTML (a) {Return A. Replace (/ / g, “>). Replace (/ & / g,” & “). Replace (/ / g,”) .Replace (/ “/ g,” “”) .replace / ‘/ g, “‘”}

The above JS single quotation number is replaced by a dual quotation number, and the double quotes replace it into a single quotation mark is a small package. Everyone’s all content, I hope to give you a reference, I also hope that everyone will support Tumi Clouds.
                    
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment