回答編集履歴
1
別解
answer
CHANGED
@@ -1,3 +1,16 @@
|
|
1
1
|
```
|
2
2
|
$("#entryForm1").find("input,textarea,select").prop("disabled", true)
|
3
|
+
```
|
4
|
+
|
5
|
+
# 別解
|
6
|
+
回答がかぶってしまったので、別解としてjQueryナシ版を追記しておきます
|
7
|
+
```javascript
|
8
|
+
window.onload=function(){
|
9
|
+
Array.prototype.map.call(
|
10
|
+
document.querySelector("#entryForm1").querySelectorAll("input,textarea,select"),
|
11
|
+
function(i){
|
12
|
+
i.disabled=true;
|
13
|
+
}
|
14
|
+
);
|
15
|
+
}
|
3
16
|
```
|