日期:2014-05-17 浏览次数:20971 次
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="flexbox.aspx.cs" Inherits="WebApplication3.flexbox" ValidateRequest="false" %> <!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 runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <script language="javascript" type="text/javascript" src="Scripts/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript"> $(function () { $('#btnShow').click(function () { var li = $('#txtStartCreateTime').val(); alert(li); } ) }) </script> </head> <body> <form id="form1" runat="server"> <asp:TextBox ID="txtStartCreateTime" runat="server" onFocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" /> <input id="btnShow" type="button" value="显示" /> </form> </body> </html>
------解决方案--------------------
onFocus="WdatePicker(skin;'whygreen',isshowclear:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
在用户控件里设置属性取值txt.Text