回答編集履歴

1

追記

2019/11/15 02:46

投稿

kyoya0819
kyoya0819

スコア10429

test CHANGED
@@ -1 +1,47 @@
1
1
  パッと思いついたのはaタグにあらかじめモーダルを閉じるように設定してaの機能を無効化してクリックされた要素のhref属性を取得してJsでジャンプかな?
2
+
3
+
4
+
5
+ ```HTML
6
+
7
+ <a href=https://google.co.jp id=a1>aiueo</a>
8
+
9
+ ```
10
+
11
+ ```CsS
12
+
13
+
14
+
15
+ a {
16
+
17
+ display: inline-block;
18
+
19
+ width: 100px;
20
+
21
+ height: 100px;
22
+
23
+ background: yellow
24
+
25
+ }
26
+
27
+
28
+
29
+ ```
30
+
31
+ ```JS
32
+
33
+
34
+
35
+ document.getElementById('a1').onclick = function(){
36
+
37
+ document.getElementById('a1').style.width = '300px';
38
+
39
+ window.open(document.getElementById('a1').getAttribute('href'));
40
+
41
+ return false;
42
+
43
+ }
44
+
45
+
46
+
47
+ ```