質問編集履歴
1
質問変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,6 +36,44 @@
|
|
36
36
|
|
37
37
|
var htmlList = html.split("</school>");
|
38
38
|
|
39
|
+
for(var i = 0; i < html.length; i++){
|
40
|
+
|
41
|
+
var option = document.createElement('div');
|
42
|
+
|
43
|
+
var inputBox = $("#schoolName").outerWidth();
|
44
|
+
|
45
|
+
option.setAttribute('class','select');
|
46
|
+
|
47
|
+
option.setAttribute('class','over');
|
48
|
+
|
49
|
+
option.setAttribute("style" , "width:" + (inputBox - 50) + "px;");
|
50
|
+
|
51
|
+
if(htmlList[i]){
|
52
|
+
|
53
|
+
var firstNameIndex = htmlList[i].indexOf("<name>");
|
54
|
+
|
55
|
+
var htmlList1 = htmlList[i].substr(firstNameIndex + 6);
|
56
|
+
|
57
|
+
var lastNameIndex = htmlList1.indexOf("</name>");
|
58
|
+
|
59
|
+
var nameList = htmlList1.substr(0 , lastNameIndex);
|
60
|
+
|
61
|
+
if(nameList != ""){
|
62
|
+
|
63
|
+
option.setAttribute('value',nameList);
|
64
|
+
|
65
|
+
option.setAttribute('onClick','selectValue('+ '\"' + nameList +'\"' +')');
|
66
|
+
|
67
|
+
option.innerHTML = nameList;
|
68
|
+
|
69
|
+
schoolList.appendChild(option);
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
}
|
76
|
+
|
39
77
|
}
|
40
78
|
|
41
79
|
});
|
@@ -47,3 +85,11 @@
|
|
47
85
|
よりレスポンシブを早くし、正確なデータを取得したいです。
|
48
86
|
|
49
87
|
何卒、ご教授の程、宜しく御願い致します。
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
###問題
|
92
|
+
|
93
|
+
文字を抽出したり、削除したりして学校名を取得しているため、
|
94
|
+
|
95
|
+
コードが乱雑になってしまっております。。。
|