出于某种原因,这使得我的网页卡住,没有显示alert
卡住我的网页在一些字符串没有错误
我想在一些文本与\"
更换"
。
示例参数
Search = "
Replace = \"
Text = "hello world"
注 的Text
是"hello world"
没有牛逼hello world
预期输出(Text
)应\"hello world\"
var Search = prompt("What To Search?"); // It will be the sign "
var Replace = prompt("What Sign To Replace?"); // It will be the sign \"
var Text = prompt("Write Text Here");
while(Text.includes(Search))
{
Text=Text.replace(Search,Replace);
} // It's didn't replace all so I did this
alert(Text);
那么你有一个解决方案? – casraf
@casraf正在研究解决方案,现在已更新。 – Dij