因此,我正在运行Web视图,并且如果它是数字输入,我想将键盘上的键盘更改为数字,但是我无法这样做。 那么有什么办法可以做到吗?甚至不可能吗?
答案 0 :(得分:0)
在您的网络视图中,尝试将<input type="number" .../>
放进去,键盘应该会自动更改为数字。
答案 1 :(得分:0)
item_count = request.form['item_count']
for i in range(item_count):
# key_0, key_1, key_2, etc... should be replace for the corresponding keys of dict_item
# that you use for build your form.
# Dict are unordered, I used the numbers to reflect the previous order you were using.
payload = {
'calendar_event[context_code]': "MY_USER",
'calendar_event[title]': input_values[key_0 + i],
'calendar_event[start_at]': input_values[key_1 + i]+"T"+input_values[key_2 + i]+"Z",
'calendar_event[end_at]': input_values[key_3 + i]+"T"+input_values[key_4 + i]+"Z",
'calendar_event[description]': input_values[key_5 + i]
}
# Do with payload whatever you want to do.
当输入获得焦点时,这两个按钮都会显示数字小键盘。感谢How to force keyboard with numbers in mobile website in Android的Richard Kernahan。干杯