html标签和python [英] html tags and python

查看:73
本文介绍了html标签和python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我正在为我的网页制作一些东西


用户可以选择一个月:我用的是下拉框。


< select>

< option name =" 1" value =" 1"> 1月

< option name =" 2" value =" 2">二月

< option name =" 3" value =" 3"> March

< option name =" 4" value =" 4"> April

< option name =" 5" value =" 5"> May

< option name =" 6" value =" 6"> June

< option name =" 7" value =" 7"> 7月

< option name =" 8" value =" 8"> August

< option name =" 9" value =" 9"> September

< option name =" 10" value =" 10">十月

< option name =" 11" value =" 11"> November

< option name =" 12" value =" 12"> 12月

< / select>


事情是:

我也想要用户选择日期

我将使用另一个下拉框进行此操作。

但如果选择了第一个月,那么应该有31天的时间

下拉框,如果第二个月被选中,那么

dropdownbow应该有28天。


我知道一些python编程,但是不要太多,我有一种感觉,我应该使用cgi,可以解释一下我要做的事情吗?或者给我

a链接到我可以复制代码的网站


所有帮助将不胜感激。


感谢您的时间

Hi all

I am making something for my webpage

Where the user can choose a month: I have made that with a dropdown box.

<select>
<option name = "1" value="1">January
<option name = "2" value="2">February
<option name = "3" value="3">March
<option name = "4" value="4">April
<option name = "5" value="5">May
<option name = "6" value="6">June
<option name = "7" value="7">July
<option name = "8" value="8">August
<option name = "9" value="9">September
<option name = "10" value="10">October
<option name = "11" value="11">November
<option name = "12" value="12">December
</select>

The thing is:
I also want the user to choose a date
I will make this with another dropdownbox.
But if the first month is selected, then there should be 31 days in the days
dropdownbox, if the second month is selected there should be 28 days in the
dropdownbow.

I Know a little of python programming, but not to much, I have a feeling of
that I should use a cgi, can any explain me what I have to do :? Or give me
a link to a site where I can copy the code for it

All help will be greatly appreciated.

Thanks for your time

推荐答案

如果我理解您的要求,那么Python& CGI是一个糟糕的

解决方案。有一页请求月份很容易,点击

提交,然后有第二页询问确切的日期。简单;但是

糟糕的设计。


你想要一个页面下拉几个月。当您选择

月份时,您希望动态更改日期下拉菜单,而无需刷新页面




为此任务你想要将JavaScript从工具箱中拉出来。这个

是一个相当常见的问题。和google搜索示例/样本应该很快很容易。

If I understand what you are asking then Python & CGI are a poor
solution. It would be easy to have one page ask for the month, click
submit, then have a second page ask for the exact date. Easy; but
terrible design.

You want to have one page with a dropdown of months. When you select a
month, you want to dynamicly alter a dropdown of dates without
refreshing the page.

For this task you''ll want to pull JavaScript out of your toolbox. This
is a fairly common "problem" and googling for examples/samples should
be quick-n-easy.


谢谢。

你知道我应该谷歌后,哪些关键词?


问候......

" Kane" < JA ********** @ gmail.com>在消息中写道

news:11 ********************** @ g14g2000cwa.googlegr oups.com ...
Thanks.

Do you know what I should google after, which key words ?

regards...
"Kane" <ja**********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
如果我理解你的要求那么Python& CGI是一个糟糕的解决方案。有一页要求月份很容易,点击
提交,然后有第二页询问确切的日期。简单;但是设计很糟糕。

你想要一个页面下拉几个月。选择
月份时,您希望动态更改日期下拉列表而不刷新页面。

对于此任务,您需要将JavaScript拉出工具箱。这是一个相当普遍的问题。和google搜索示例/样本应该很容易。
If I understand what you are asking then Python & CGI are a poor
solution. It would be easy to have one page ask for the month, click
submit, then have a second page ask for the exact date. Easy; but
terrible design.

You want to have one page with a dropdown of months. When you select a
month, you want to dynamicly alter a dropdown of dates without
refreshing the page.

For this task you''ll want to pull JavaScript out of your toolbox. This
is a fairly common "problem" and googling for examples/samples should
be quick-n-easy.



Kane写道:
如果我了解你的要求然后Python& CGI是一个糟糕的解决方案。有一页要求月份很容易,点击
提交,然后有第二页询问确切的日期。简单;但是
糟糕的设计。
If I understand what you are asking then Python & CGI are a poor
solution. It would be easy to have one page ask for the month, click
submit, then have a second page ask for the exact date. Easy; but
terrible design.




改进就是让下拉列表框从1到31,

如果是用户输入无效日期,给他们一个错误消息,并且要求他们重新输入日期。



An improvement is to just have the dropdown listbox go from 1 to 31,
and if the user enters an invalid date, give them an error message and
ask them to re-enter the date.


这篇关于html标签和python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆