質問編集履歴
2
コード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,8 +42,142 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
+
```
|
46
|
+
|
47
|
+
function entryChange2(){
|
48
|
+
|
49
|
+
//プルダウンを選択されたときに、Class「on」を削除
|
50
|
+
|
51
|
+
$('.on').removeClass();
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
//プルダウン押下時:変更処理
|
56
|
+
|
57
|
+
if(document.getElementById('changeSelect')){
|
58
|
+
|
59
|
+
id = document.getElementById('changeSelect').value;
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
if(id == 'select2013'){
|
64
|
+
|
65
|
+
//2013年表示
|
66
|
+
|
67
|
+
document.getElementById('Box2017').style.display = "none";
|
68
|
+
|
69
|
+
document.getElementById('Box2016').style.display = "none";
|
70
|
+
|
71
|
+
document.getElementById('Box2015').style.display = "none";
|
72
|
+
|
73
|
+
document.getElementById('Box2014').style.display = "none";
|
74
|
+
|
75
|
+
document.getElementById('Box2013').style.display = "";
|
76
|
+
|
77
|
+
document.getElementById('Box2012').style.display = "none";
|
78
|
+
|
79
|
+
document.getElementById('Box2011').style.display = "none";
|
80
|
+
|
81
|
+
}else if(id == 'select2012'){
|
82
|
+
|
83
|
+
//2012年表示
|
84
|
+
|
85
|
+
document.getElementById('Box2017').style.display = "none";
|
86
|
+
|
87
|
+
document.getElementById('Box2016').style.display = "none";
|
88
|
+
|
89
|
+
document.getElementById('Box2015').style.display = "none";
|
90
|
+
|
91
|
+
document.getElementById('Box2014').style.display = "none";
|
92
|
+
|
93
|
+
document.getElementById('Box2013').style.display = "none";
|
94
|
+
|
95
|
+
document.getElementById('Box2012').style.display = "";
|
96
|
+
|
97
|
+
document.getElementById('Box2011').style.display = "none";
|
98
|
+
|
99
|
+
}else if(id == 'select2011'){
|
100
|
+
|
101
|
+
//2011年表示
|
102
|
+
|
103
|
+
document.getElementById('Box2017').style.display = "none";
|
104
|
+
|
105
|
+
document.getElementById('Box2016').style.display = "none";
|
106
|
+
|
107
|
+
document.getElementById('Box2015').style.display = "none";
|
108
|
+
|
109
|
+
document.getElementById('Box2014').style.display = "none";
|
110
|
+
|
111
|
+
document.getElementById('Box2013').style.display = "none";
|
112
|
+
|
113
|
+
document.getElementById('Box2012').style.display = "none";
|
114
|
+
|
115
|
+
document.getElementById('Box2011').style.display = "";
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
```
|
124
|
+
|
125
|
+
|
126
|
+
|
45
127
|
changeItem(this)では、選択後にプルダウンの中フォントや枠組みのcssを変更しています。
|
46
128
|
|
47
129
|
|
48
130
|
|
131
|
+
```function changeItem(obj){
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
if( obj.value == ""){
|
136
|
+
|
137
|
+
obj.style.border = '1px solid #003a62';
|
138
|
+
|
139
|
+
obj.style.fontWeight = "bold";
|
140
|
+
|
141
|
+
obj.style.fontSize = "107.14%";
|
142
|
+
|
143
|
+
}else{
|
144
|
+
|
145
|
+
obj.style.border = '1px solid #003a62';
|
146
|
+
|
147
|
+
obj.style.fontWeight = "bold";
|
148
|
+
|
149
|
+
obj.style.fontSize = "107.14%";
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
```
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
49
161
|
imgChange(this);では、選択後画像プルダウンに付随している画像の切替をしています。
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
```
|
166
|
+
|
167
|
+
function imgChange(parts){
|
168
|
+
|
169
|
+
fname=parts.options[parts.selectedIndex].value;
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
if(fname==0){document.imgsmp.src=img0.src;} //横矢印
|
174
|
+
|
175
|
+
if(fname =="select2013"){document.imgsmp.src=img1.src;} //下矢印
|
176
|
+
|
177
|
+
if(fname =="select2012"){document.imgsmp.src=img1.src;} //下矢印
|
178
|
+
|
179
|
+
if(fname =="select2011"){document.imgsmp.src=img1.src;} //下矢印
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
```
|
1
onhangeでの処理追記です。
test
CHANGED
File without changes
|
test
CHANGED
@@ -33,3 +33,17 @@
|
|
33
33
|
|
34
34
|
|
35
35
|
宜しくお願いいたします。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
*追記*
|
40
|
+
|
41
|
+
entryChange2()では、2013年を選択したときに、他の年のデータを表示にしています。
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
changeItem(this)では、選択後にプルダウンの中フォントや枠組みのcssを変更しています。
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
imgChange(this);では、選択後画像プルダウンに付随している画像の切替をしています。
|