回答編集履歴
1
追記
answer
CHANGED
@@ -3,4 +3,19 @@
|
|
3
3
|
|
4
4
|
> Parse str with an HTML parser, and return the newly created document.
|
5
5
|
> The scripting flag must be set to "disabled".
|
6
|
-
[DOM Parsing and Serialization](http://www.w3.org/TR/DOM-Parsing/#widl-DOMParser-parseFromString-Document-DOMString-str-SupportedType-type)
|
6
|
+
[DOM Parsing and Serialization](http://www.w3.org/TR/DOM-Parsing/#widl-DOMParser-parseFromString-Document-DOMString-str-SupportedType-type)
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
#####追記
|
11
|
+
回避策を書くの忘れてました。
|
12
|
+
```javascript
|
13
|
+
function replace()
|
14
|
+
{
|
15
|
+
var data = document.scripts[0].innerHTML;
|
16
|
+
var script = document.createElement('script');
|
17
|
+
script.appendChild(document.createTextNode(data.replace(/sho[w]1/g,"show2").replace(/OK\sDESU/g,"OK KANA")));
|
18
|
+
document.body.appendChild(script);
|
19
|
+
}
|
20
|
+
```
|
21
|
+
こんなのはどうですか?
|