【发布时间】:2014-12-01 14:33:51
【问题描述】:
我有一个通过选择日期范围发布到 PHP 脚本的表单,这是我的fiddle 用于视觉理解。如何根据在发布之前选择的单选按钮在空框/输入字段(不允许输入)中显示日期?
提前致谢!
例子:
I select one month ago:
( ) ( ) (X) ( )
1day 1week 1month 3months
-----------------
|2014 - 11 - 01 | Date From: (the date being selected)
-----------------
-----------------
|2014 - 12 - 01 | Date: To: (the present day, today)
---------
| get aht | (button)
---------
这是我的表格:
<div id="menu_option">
<h1>Menu Option</h1>
<div id="button_position">
<div id="date_selector">
<label>Select Date Range</label>
<form action="show_aht2.php" method="post" id="formtopost">
<input type="radio" name="date_selected" value="1d" checked="checked"/>1d
<input type="radio" name="date_selected" value="1w" />1w
<input type="radio" name="date_selected" value="1m" />1m
<input type="radio" name="date_selected" value="3m" />3m
<input type="button" id="aht_btn" name="get_aht" value="Get AHT" />
</form>
</div><!--date selector-->
<div class="clear"></div>
<button id="refresh_page">Refresh Page</button>
</div>
CSS:我想在 AHT 按钮之前显示日期框。另外,如何使所有按钮的大小相同?
/*container for all divs inside*/
#container {
width:1450px;
}
/*map size*/
#map_size{
width:1190px;
height:1300px;
background:#0099FF;
border-style: solid;
border-color: black;
position: relative;
float:left;
}
/*menu bar option*/
#menu_option{
width:230px;
height:600px;
background:#0099FF;
border-style: solid;
border-color: black;
position: relative;
float:right;
overflow:hidden;
text-align:center;
}
input[type="radio"] {
margin-left:10px;
}
#date_selector{
border:3px;
border-color:black;
}
#button_position{
/*width: 100px;
height: 80px
position: absolute;*/
}
#button_position button{
font-weigth:bold;
font-size:1.3em;
}
button:hover{
cursor: pointer;
}
button {
margin:5px auto;
font:16px tahoma; /*every size you want.*/
}
/*clear */
.clear {
clear:both;
}
【问题讨论】:
-
“在一个盒子里”是什么意思?
-
是的语法错误大声笑
-
所以你可以在那个按钮之前使用一个 div 来显示它。没事吧?
-
只要它适合你在我的小提琴中看到的“菜单选项”CSS,是的
-
您想在单击按钮之前使用 Javascript 或在表单发布之后使用 PHP 显示日期吗?
标签: javascript php jquery html css