jquery 日历控件

a2506560872 2012-04-18 02:07:55
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CSS Tables</title>
<link rel="stylesheet" type="text/css" href="GooCalendar/GooCalendar.css"/>
<script type="text/javascript" src="jquery-1.6.js"></script>
<script type="text/javascript" src="GooCalendar/GooCalendar.js"></script>
<script type="text/javascript" src="GooCalendar/GooFunc.js"></script>
<style type="text/css">

</style>
</head>

<script type="text/javascript">
var property={
divId:"demo2",//日历控件最外层DIV的ID
needTime:true,//是否需要显示精确到秒的时间选择器,即输出时间中是否需要精确到小时:分:秒 默认为FALSE可不填
yearRange:[1970,2099],//可选年份的范围,数组第一个为开始年份,第二个为结束年份,如[1970,2030],可不填
week:['日','一','二','三','四','五','六'],//数组,设定了周日至周六的显示格式,可不填
month:['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],//数组,设定了12个月份的显示格式,可不填
format:"yyyy-MM-dd hh:mm:ss"/*设定日期的输出格式,可不填*/
};
function ch(x)
{

$("#t_explain").parent().parent().toggle(500);
}

$(document).ready(function(){
var x=10;
var y=20;
canva=$.createGooCalendar("ks",property);
property.divId='demo1';
canva=$.createGooCalendar("js",property);
$("#ks").click(function(e){
$("#demo2").css({"top": (e.pageY+y)+"px",
"left": (e.pageX+x)+"px","position":"absolute"}).show("fast");
}).blur(function()
{
$("#demo2").hide();
}).focus(function(e)
{
$("#demo2").css({"top": (e.pageY+y)+"px",
"left": (e.pageX+x)+"px","position":"absolute"}).show("fast");
})


$("#js").click(function(e){
$("#demo1").css({"top": (e.pageY+y)+"px",
"left": (e.pageX+x)+"px","position":"absolute"}).show("fast");
}).blur(function()
{
$("#demo1").hide();
}).focus(function(e)
{
$("#demo1").css({"top": (e.pageY+y)+"px",
"left": (e.pageX+x)+"px","position":"absolute"}).show("fast");
})
$("#t_explain").parent().parent().toggle(500);

});
</script>
<body>
<table id="mytable" align="center" width="200" >
<tr>
<td colspan="2" align="center" valign="middle"><span class="STYLE1">计划/行动发布</span></td>
</tr>
<tr>
<td width="118">类型:</td>
<td width="566" ><label>
<select name="select" onchange="ch(this.value)">
<option value="0">计划</option>
<option value="1">行动</option>
</select>
</label></td>
</tr>
<tr>
<td>开始时间:</td>
<td><input type="text" value="" id="ks"/></td>
</tr>
<tr>
<td>结束时间:</td>
<td><input name="text" type="text" id="js" value=""/></td>
</tr>
<tr>
<td>内容:</td>
<td><label>
<input type="text" name="textfield" />
</label></td>
</tr>
<tr>
<td>说明:</td>
<td><input name="t_explain" type="text" id="t_explain" /></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="button" onclick="" value="执行" />
</td>
</tr>
</table>

</body>
</html>

------------------我的本意是失去焦点隐藏组件,现在是失去焦点文本框无值
...全文
364 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gyw930 2012-04-18
  • 打赏
  • 举报
回复
接分。。。。。。感谢楼主。。。
LFDream 2012-04-18
  • 打赏
  • 举报
回复
自己解决了、那就恭喜了·····
  • 打赏
  • 举报
回复
偶也要。。
zuxianghuang 2012-04-18
  • 打赏
  • 举报
回复
,进来就接分?
a2506560872 2012-04-18
  • 打赏
  • 举报
回复
我自己找到了,散分。。。。。。。。。。。。。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧