点击Input框弹出日期选项

时间:2022-11-27 22:41:05
<!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=utf-8" />
<title>点击text文本框弹出日期选择器</title> <!--可无视-->
<style type="text/css">
body{margin:0;padding:0;font:14px Verdana, Arial, sans-serif;line-height:200%;}
#content{padding-left:50px;padding-right:50px;}
#content h2{font-size:18px;color:#1E9300;padding-top:8px;margin-bottom:8px;}
#content h3{margin-top:8px;margin-bottom:8px;FONT:bold 14px 宋体,tahoma,arial,sans-serif;COLOR:#0033CC;}
#content div{margin-top:10px;margin-bottom:10px;border:#666 solid 1px;padding:10px;}
#content span{color:#f00;font-weight:bold;}
ul, ol{color:#000000;}
</style> <!--必要js文件/样式表已经引入在js里面了-->
<script type="text/javascript" src="http://down.admin5.com/demo/code_pop/18/1299/lhgcore.js"></script>
<script type="text/javascript" src="http://down.admin5.com/demo/code_pop/18/1299/lhgcalendar.js"></script> </head> <body> <div id="content"> <h2>常规弹出日历示例页</h2>
<hr size="1" style="width:400px;" align="left">
<h3>1. 在控件下面或右面弹出日历组件(默认是在下面弹出) </h3>
<div>
<input type="text" id="c1" value ="开始" onclick="J.calendar.get();"/> 显示在下面
<input type="text" id="c2" onclick="J.calendar.get({dir:'right'});"/> 显示在右面
</div> <h3>2. 通过按钮或图片等其它控件弹出日历组件</h3>
<div>
<input type="text" id="c3"/>
<input type="button" id="btn" onclick="J.calendar.get({id:'c3'});" value="弹出"/>
<input type="text" id="c4"/>
<img align="absmiddle" src="data:images/date.gif" onclick="J.calendar.get({id:'c4'});"/>
</div> <h3>3. 显示日期的2种格式(默认为 年-月-日 格式)</h3>
<div>
<input type="text" id="c5" onclick="J.calendar.get();"/> 年-月-日 格式
<input type="text" id="c6" onclick="J.calendar.get({type:'/'});"/> 月/日/年 格式
</div> <h3>4. 在文本框显示带时间的日期</h3>
<div>
<input type="text" id="c7" onclick="J.calendar.get({time:true});"/>
</div> <h3>5. 日期范围限制</h3>
<div>
<input type="text" id="c8" onclick="J.calendar.get({to:'2009-8-8,min'});"/> 只能选择2009-8-8以前的日期
<input type="text" id="c9" onclick="J.calendar.get({to:'2009-8-18,max'});"/> 只能选择2009-8-18以后的日期<br/>
<input type="text" id="c10" onclick="J.calendar.get({to:'c11,min'});"/>
<input type="text" id="c11" onclick="J.calendar.get({to:'c10,max'});"/> 这2个文本框,前面的日期不能大于后面的日期,后面的不能小于前面的日期。
</div> </div>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>

点击Input框弹出日期选项的更多相关文章

  1. 原生js日期时间插件鼠标点击文本框弹出日期时间表格选择日期时间

    原文出处 (这是我从互联网上搜来的,感觉能满足各方面的需求.个人感觉挺不错的,所以后期修改了一下向大家推荐!) 效果图: html代码: <!DOCTYPE html PUBLIC " ...

  2. 点击input触发弹出框的bug

    先点击第一个input建立弹出框,再点击第二个input打开弹出框,操作点击,同时触发了两个input点击事件.主要原因是建立弹出框时绑定了input1的click事件,再次触发时,又再亿次绑定了in ...

  3. ionic3 点击输入 框弹出白色遮罩 并把 界面顶到上面

    这个蛋疼 问题 ,在android 上面遇到这种情况 ,键盘弹出的时候 总有一个白色的遮罩在后面出现,网上查了很久都没发现原因. 偶然发现一个方法 ,试下了下 问题解决了. 代码如下: IonicMo ...

  4. android 弹出日期选择框

    DatePickerDialog 在很多时候需要用户去设定时间,不可能让用户去在一个文本框中去输入时间,所以就需要有个日期弹出选择框,而这个框就是DatePickerDialog. 1.在API中的D ...

  5. div悬浮在屏幕的中间及点击按钮关闭弹出框

    #fd { position: fixed; z-index: 999; width: 109px; height: 323px; top: 71%; right: 1%; margin: -50px ...

  6. vue封装公用弹出框方法,实现点击出现操作弹出框

    vue封装公用弹出框方法,实现点击出现操作弹出框 如上图所示,这次要实现一个点击出现操作弹框的效果:并将这个功能封装成一个函数,便于在项目的多个地方使用. 具体思路是: 封装一个组件,组件保护一个插槽 ...

  7. iOS下Html页面中input获取焦点弹出键盘时挡住input解决方案—scrollIntoView&lpar;&rpar;

    问题描述 iOS系统下,移动web页面,inpu获取焦点弹出系统虚拟键盘时,偶尔会出现挡住input的情况,尽管概率不大,但是十分影响用户体验. 问题重现 原始页面:页面中有header.main.f ...

  8. iOS下Html页面中input获取焦点弹出键盘时挡住input解决方案

    问题描述 iOS系统下,移动web页面,inpu获取焦点弹出系统虚拟键盘时,偶尔会出现挡住input的情况,尽管概率不大,但是十分影响用户体验. 问题重现 原始页面:页面中有header.main.f ...

  9. 原生Js封装的弹出框-弹出窗口-页面居中-多状态可选

    原生Js封装的弹出框-弹出窗口-页面居中-多状态可选   实现了一下功能: 1.title可自定义 可拖拽 2.width height可以自定义 3.背景遮罩和透明度可以自定义 4.可以自己编辑弹出 ...

随机推荐

  1. 【WPF】 Timer与 dispatcherTimer 在wpf中你应该用哪个?

    源:Roboby 1.timer或重复生成timer事件,dispatchertimer是集成到队列中的一个时钟.2.dispatchertimer更适合在wpf中访问UI线程上的元素 3.Dispa ...

  2. const用法小结

    const与指针 char *const p --> char *(const p) --> 指针常量 char const *p --> char (const *p) --&gt ...

  3. 【转载】HTTP 错误 500&period;19 - Internal Server Error

    windows 2008下IIS7 安装ASP.NET 遇到如下错误: HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效. ...

  4. Servlet分页技术

    这是看韩顺平老师的servlet视频,自己动手写的,楼主看韩顺平老师的servlet是2006制作的,用的是sql server数据库,自己又用的是oracle数据库,所以怕有的同学遇到同样的问题,不 ...

  5. strong &amp&semi; weak

    Here is a quick summary: A strong reference will keep the object it points to from being deallocated ...

  6. Java web--反射(解刨)

    本质:先加载类           再解刨类的方法,字段,构造函数 目的:解刨出构造函数       为了new对象 解刨出字段             为了封装数据进去 解刨方法           ...

  7. VCL主要框架

    TObject ->TPersistent  Classes,抽象类 ->TComponent  Classes,抽象类 ->TControl  Controls ->TGra ...

  8. 多线程 -- NSOperation

    NSOperation 此类不能直接使用 NSInvocationOperation NSBlockOperation 定义一个类继承与它 NSInvocationOperation 可以使用star ...

  9. Android学习之SQLite学习

    花了2天时间,系统学习了下Android开发过程中使用的轻量级数据库SQLite的使用. 并掌握其增,删,该,查的基本数据库操作. 首先要使用SQLite数据库,须要通过Android系统提供的SQL ...

  10. 南大算法设计与分析课程OJ答案代码(4)--变位词、三数之和

    问题 A: 变位词 时间限制: 2 Sec  内存限制: 10 MB提交: 322  解决: 59提交 状态 算法问答 题目描述 请大家在做oj题之前,仔细阅读关于抄袭的说明http://www.bi ...