时分秒选择控件

/**//***********************************
* 使用说明:
* 首先把本控件包含到页面 
* 
* 控件调用函数:_SetTime(field)
* 例如 
*
************************************/

var str = "";
document.writeln("
"); str += "\u65f6 \u5206 \u79d2 " + "
"; document.writeln(str); var _fieldname; function _SetTime(tt) { document.getElementById("_contents").style.display="block"; _fieldname = tt; var ttop = tt.offsetTop; //TT控件的定位点高 var thei = tt.clientHeight; //TT控件本身的高 var tleft = tt.offsetLeft; //TT控件的定位点宽 while (tt = tt.offsetParent) { ttop += tt.offsetTop; tleft += tt.offsetLeft; } document.all._contents.style.top = ttop + thei + 4; document.all._contents.style.left = tleft; document.all._contents.style.visibility = "visible"; } function _select() { _fieldname.value = document.all._hour.value + ":" + document.all._minute.value + ":" + document.all._second.value; document.all._contents.style.visibility = "hidden"; document.getElementById("pushForm").action=document.getElementById("pushForm").action+"releaseDate-"+_fieldname.value; } function _hide(){ document.getElementById("_contents").style.display="none"; }

 
  


 

你可能感兴趣的:(jsp/js/css)