回答編集履歴
1
追記しました。
answer
CHANGED
@@ -41,4 +41,31 @@
|
|
41
41
|
</html>
|
42
42
|
```
|
43
43
|
safariでの表示
|
44
|
-

|
44
|
+

|
45
|
+
|
46
|
+
##追記
|
47
|
+
質問者様がおっしゃったようなwikipediaを表示させるものはこんな感じでしょうか?参考程度にどうぞ
|
48
|
+
|
49
|
+
```lang-html
|
50
|
+
<!doctype html>
|
51
|
+
<html>
|
52
|
+
<head>
|
53
|
+
<meta charset="utf-8">
|
54
|
+
<title>wikipedia in iframe</title>
|
55
|
+
</head>
|
56
|
+
<script>
|
57
|
+
window.addEventListener("load",function(){
|
58
|
+
document.getElementById("searchButton").addEventListener("click",function(){
|
59
|
+
var url = "https://ja.wikipedia.org/wiki/" + document.getElementById("searchWord").value;
|
60
|
+
document.getElementById("iF").src = url;
|
61
|
+
},false);
|
62
|
+
},false);
|
63
|
+
</script>
|
64
|
+
<body>
|
65
|
+
<input type="text" id="searchWord" placeholder="検索ワード"></input> <button id="searchButton">wiki検索</button>
|
66
|
+
<br />
|
67
|
+
<br />
|
68
|
+
<iframe id="iF" src="https://ja.wikipedia.org/wiki/" width="100%" height="1000px">iframeに対応していません。</iframe>
|
69
|
+
</body>
|
70
|
+
</html>
|
71
|
+
```
|