在下拉框中自动选择实际月份 [英] auto select actual month in dropdown box

查看:97
本文介绍了在下拉框中自动选择实际月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我怎么能这样做,

我有一个带下拉菜单的小表格。

< select name =" maand">

< option value =''1''> januari< / option>

< ; option value ='''''> februari< / option>

< option value =''3''> maart< / option>

< ; option value ='''4''> april< / option>

< option value ='''5''> mei< / option>

< ; option value ='''6''> juni< / option>

< option value =''7''> juli< / option>

< ; option value ='''8''> augustus< / option>

< option value =''9''> 9月< / option>

< ; option value ='''10''> oktober< / option>

< option value =''11''> 11月< / option>

< ; option value ='''12''> december< / option>

< / select>

我想自动选择当月,

但不知道怎么做?

我会这样开始(我想)


$ maand = S_POST [" maand"];

$ maandhuidig = date(n);

if($ maandhuidig == $ maand){

echo?....不知道......}


很多tnx

-

运行GNU / Linux

yvesdm [AT] telenet [dot] be | GnuPG:0xD590F022

Jabber:yvesdm [AT] jabber.belnet.be

如果windows是解决方案,那么请给我回答问题!

Hi,

How can I do this,
I''ve got a little form with a dropdown.

<select name="maand">
<option value=''1''>januari</option>
<option value=''2''>februari</option>
<option value=''3''>maart</option>
<option value=''4''>april</option>
<option value=''5''>mei</option>
<option value=''6''>juni</option>
<option value=''7''>juli</option>
<option value=''8''>augustus</option>
<option value=''9''>september</option>
<option value=''10''>oktober</option>
<option value=''11''>november</option>
<option value=''12''>december</option>
</select>
I would like to select the current month automatically,
but don''t know how to do this?
I would start like this (I think)

$maand = S_POST["maand"];
$maandhuidig = date(n);
if($maandhuidig == $maand){
echo?....don''t know...}

Many tnx
--
Running GNU/Linux
yvesdm[AT]telenet[dot]be | GnuPG: 0xD590F022
Jabber: yvesdm[AT]jabber.belnet.be
"If windows is the solution, plz give me the problem back!"

推荐答案

maand = S_POST [" maand"];
maand = S_POST["maand"];


maandhuidig = date(n);

if(
maandhuidig = date(n);
if(


maandhuidig ==
maandhuidig ==


这篇关于在下拉框中自动选择实际月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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