请问获取日期选择器Value值得有关问题

WBOY
Release: 2016-06-13 11:36:58
Original
915 people have browsed it

请教获取日期选择器Value值得问题
在form当中有一个input type=text,通过点击文本框弹出日期选择器后,如何才能获得该文本框的值呢?因为没有Value赋值,所以post过来以后变成了空值。

文本框日期选择器代码如下:

<td><input type="text" name="bgntime" border="0" size="20" style="vertical-align:middle" onFocus="HS_setDate(this);" ><br />					<div id='dateTime' onclick='event.cancelBubble=true' style="position:absolute;visibility:hidden;width:100px;height:100px;left=0px;top=0px;z-index:100;)"><br /><table class="cal_table" border='0'><tr><td><br /><script>    var c = new CalendarCalendar('c');document.write(c);</script><br /></td></tr><tr><td valign="top" align="center"><br /><script>    var m = new CalendarMinute('m');document.write(m);</script><br /></td></tr></table><iframe src="javascript:false" style="height:300px;" class="menu_iframe"></iframe><br />					</div><br /><SCRIPT event=onclick() for=document>hideCalendar()</SCRIPT><br />					<br />					</td>
Copy after login


Js如下:
function HS_setDate(inputObj){<br />	var calenderObj = document.createElement("span");<br />	calenderObj.innerHTML = HS_calender(new Date());<br />	calenderObj.style.position = "absolute";<br />	calenderObj.targetObj = inputObj;<br />	inputObj.parentNode.insertBefore(calenderObj,inputObj.nextSibling);<br />}<br />
Copy after login


获取$_post['bgntime']的值为空,怎么才能获取到日期呢?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template