Replace forward slash “/ ” character in JavaScript string?

前端 未结 8 586
你的背包
你的背包 2020-12-02 15:35

I have this string:

var someString = \"23/03/2012\";

and want to replace all the \"/\" with \"-\".

I tried to do this:

<         


        
8条回答
  •  广开言路
    2020-12-02 16:03

    Remove all forward slash occurrences with blank char in Javascript.

    modelData = modelData.replace(/\//g, '');
    

提交回复
热议问题