質問編集履歴
3
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,7 +15,6 @@
|
|
15
15
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
16
16
|
</head>
|
17
17
|
<body>
|
18
|
-
<button id="button1" onclick="setDisabled()">button1</button>
|
19
18
|
<div id="loadHtml2"></div>
|
20
19
|
<script type="text/javascript">
|
21
20
|
$(function(){
|
2
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,8 +33,10 @@
|
|
33
33
|
|
34
34
|
### 試したこと
|
35
35
|
- html1にbutton1を作成し、onclickで`$("#button2").prop("disabled",true);`を記載したところ、ボタン押下時に非活性になりました。
|
36
|
+
```html1
|
37
|
+
<button id="button1" onclick="setDisabled()">button1</button>
|
38
|
+
```
|
36
39
|
```JavaScript
|
37
|
-
|
38
40
|
function setDisabled(){
|
39
41
|
$("#button2").prop("disabled",true);
|
40
42
|
}
|
1
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,10 @@
|
|
32
32
|
```
|
33
33
|
|
34
34
|
### 試したこと
|
35
|
-
- html1にbutton1を作成し、onclickで`$("#button2").prop("disabled",true);`を記載したところ、ボタン押下時に非活性になりました。
|
35
|
+
- html1にbutton1を作成し、onclickで`$("#button2").prop("disabled",true);`を記載したところ、ボタン押下時に非活性になりました。
|
36
|
+
```JavaScript
|
37
|
+
|
38
|
+
function setDisabled(){
|
39
|
+
$("#button2").prop("disabled",true);
|
40
|
+
}
|
41
|
+
```
|