<input type="text" onmousedown="" />用intput不可以吗

解决方案 »

  1.   

    梅花雪日期控件那样,在获取焦点时调用而不是MouseDown事件
    搜下梅花雪日期大把这样的帖子!
      

  2.   

    也就是onclick吧还是去找日期控件吧
      

  3.   

    这个 日历 可以实现你要的功能http://blog.csdn.net/hertcloud/archive/2007/04/12/1561713.aspx
      

  4.   

    做更新用户信息模块刚好用到这个功能,该功能其实是抄袭众多论坛的
    .aspx文件内:
    (1)在<head>标记内写入
    <script src="jscript/common.js" type="text/javascript"></script>
    <script src="jscript/calendar.js" type="text/javascript"></script>
    (2)<asp:TextBox ID="TextBox1" Runat="Server" />
    (3)那2个common.js和calendar.js可以到以下连接下载
    http://bbs.gyyx.cn/include/common.js
    http://bbs.gyyx.cn/include/calendar.js
    注意:如果运行时报错说找不到对象或错误的字符串结尾,请将这2个js文件以utf-8编码形式另存为
    ------------------------------------------------------------------
    .aspx.cs文件内:
    (1)在protected void Page_Load(object sender, EventArgs e)方法内输入:
    TextBox1.Attributes.Add("onfocus", "showcalendar(event, this);if(this.value=='0000-00-00')this.value=''");
    TextBox1.Attributes.Add("onclick", "showcalendar(event, this)");
      

  5.   

    asp.net的这些控件不用也罢,直接input就OK