teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

index\.htmlを入れました.実際は国名が多いのでselectの部分が長いので割愛しています\.やりたいことはこのhtmlファイルのselectで選ばれたものを処理してresultのところで表示した

2017/05/03 12:54

投稿

Fumitonn
Fumitonn

スコア8

title CHANGED
File without changes
body CHANGED
@@ -47,4 +47,152 @@
47
47
  The method is not allowed for the requested URL.
48
48
  ```
49
49
 
50
- となっているのでHTTPメソッドが違うのかな?とも思っています.Flaskに明るい方,どうかよろしくお願いします.
50
+ となっているのでHTTPメソッドが違うのかな?とも思っています.Flaskに明るい方,どうかよろしくお願いします.
51
+
52
+
53
+
54
+
55
+ 追記
56
+ 下はindex.htmlです
57
+
58
+ ```
59
+ <!DOCTYPE html>
60
+ <html lang="en">
61
+ <head>
62
+ <title>Flght Radiation Simulator</title>
63
+ <link rel="stylesheet" href="/static/apps.css">
64
+ </head>
65
+ <body>
66
+ <h1>Flying Radiation Simulator</h1>
67
+ <p><font size="5" face="Comic Sans MS">Please select Leaving & Going City <br><br></font></p>
68
+
69
+ <!-- What's the Flying Radiation Simulater? </font></p> -->
70
+
71
+ <div class="small-5 medium-4 columns padding-left-none">
72
+ <select class="Leaving City" id="fromCity" name="Leave">
73
+
74
+ <option selected="selected" value="">Leaving Country</option>
75
+ <!--<select name="country">-->
76
+ <option value="">Country...</option>
77
+ <option value="Afganistan">Afghanistan</option>
78
+ ...
79
+ ...
80
+ <option value="Yemen">Yemen</option>
81
+ <option value="Zaire">Zaire</option>
82
+ <option value="Zambia">Zambia</option>
83
+ <option value="Zimbabwe">Zimbabwe</option>
84
+ </select>
85
+ </select>
86
+ </div>
87
+ </div>
88
+
89
+ <div id="returnContent">
90
+ <div class="small-7 medium-8 columns padding-right-none">
91
+ <div class="input-group input-group-custom">
92
+ <span class="input-group-label input-group-label-blue">
93
+
94
+ <div class="small-5 medium-4 columns padding-left-none">
95
+ <select class="input-group-field" id="fromTime" name="go">
96
+
97
+ <option selected="selected" value="">Going Country</option>
98
+ <!--<select name="country">-->
99
+ <option value="">Country...</option>
100
+ <option value="Afganistan">Afghanistan</option>
101
+ ...
102
+ ...
103
+ <option value="Zambia">Zambia</option>
104
+ <option value="Zimbabwe">Zimbabwe</option>
105
+ </select>
106
+ </select>
107
+ </div>
108
+ </div>
109
+ </select>
110
+ </div>
111
+ </div>
112
+
113
+ <p><font size="5" face="Comic Sans MS">
114
+ Result!
115
+
116
+ {{ ms }} mSv
117
+ </font></p>
118
+
119
+ <p>
120
+ <input type="button" value="Calclate!" onclick="location.href='http://127.0.0.1:5000/result'">
121
+
122
+ <p><font size="5" face="Comic Sans MS">What's the Flying Radiation Simulater? <br><br>
123
+ This tool calculates sky’s radiation dose from collected dates.<br> You can select safe trajectory from calculated results. This tool protects your health from radiation in flight.
124
+ </font></p>
125
+
126
+ </body>
127
+ </html>
128
+ ```
129
+
130
+ 以下はresult.htmlです
131
+ ```
132
+ <!DOCTYPE html>
133
+ <html lang="en">
134
+ <head>
135
+ <title>Flight Radiation Simulator</title>
136
+ </head>
137
+ <body>
138
+ <h1>Flight Radiation Simulator</h1>
139
+ <p><font size="5" face="Comic Sans MS">Please select Leaving & Going City <br><br></font></p>
140
+
141
+ <!-- What's the Flight Radiation Simulater? </font></p> -->
142
+
143
+ <div class="small-5 medium-4 columns padding-left-none">
144
+ <select class="Leaving City" id="fromCity" name="LeaveCityform">
145
+
146
+ <option selected="selected" value="">Leaving Country</option>
147
+ <!--<select name="country">-->
148
+ <option value="">Country...</option>
149
+ <option value="Afganistan">Afghanistan</option>
150
+ ...
151
+ ...
152
+ <option value="Yemen">Yemen</option>
153
+ <option value="Zaire">Zaire</option>
154
+ <option value="Zambia">Zambia</option>
155
+ <option value="Zimbabwe">Zimbabwe</option>
156
+ </select>
157
+ </select>
158
+ </div>
159
+ </div>
160
+
161
+ <div id="returnContent">
162
+ <div class="small-7 medium-8 columns padding-right-none">
163
+ <div class="input-group input-group-custom">
164
+ <span class="input-group-label input-group-label-blue">
165
+
166
+ <div class="small-5 medium-4 columns padding-left-none">
167
+ <select class="input-group-field" id="fromTime" name="goDepartureTime">
168
+
169
+ <option selected="selected" value="">Going Country</option>
170
+ <!--<select name="country">-->
171
+ <option value="">Country...</option>
172
+ <option value="Afganistan">Afghanistan</option>
173
+ ...
174
+ ...
175
+ <option value="Zambia">Zambia</option>
176
+ <option value="Zimbabwe">Zimbabwe</option>
177
+ </select>
178
+ </select>
179
+ </div>
180
+ </div>
181
+ </select>
182
+ </div>
183
+ </div>
184
+
185
+ <p><font size="5" face="Comic Sans MS"></p>
186
+ Result!
187
+
188
+ {{ ms }} mSv
189
+ </font></p>
190
+
191
+
192
+ <p><font size="5" face="Comic Sans MS">What's the Flying Radiation Simulater? <br><br>
193
+ This tool calculates cosmic radiation dose from collected dates.<br> You can select safe trajectory from calculated results. This tool protects your health from radiation in flight.
194
+ </font></p>
195
+
196
+ </body>
197
+ </html>
198
+ ```