单击鼠标时,必须在文本框中显示自动日期。 [英] Automatic Date must be displayed in Textbox when mouse clicks.

查看:56
本文介绍了单击鼠标时,必须在文本框中显示自动日期。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,



在我的网页上,我有一个发布日期/时间的文本框。



当我在文本框内点击时...系统日期应该在DAY,Month,YEAR中自动显示。请解决这个问题。





谢谢,

Dear Frnds,

on my webform , I have a Textbox for Issue Date/time.

When i Clicks inside of Textbox...system Date should be displayed in it with DAY, Month ,YEAR Automatically. Please solve this problem.


Thanks,

推荐答案

使用此代码是在页面加载.....



为什么系统日期应该在点击时显示,它会直接在页面加载中显示你....



如果你想点击并选择更好的使用AJAX工具包....



Use this code is in page load.....

why system date should display when click, it will show u directly in page load....

Or if u want to click and select better use AJAX tool kit....

tboxDate.Text = DateTime.Now.ToString("MM/dd/yyyy");





我希望你能得到答案.....



I hope u will get your answer.....


你可以试试这个..

You can try this..
Date : <asp:textbox id="txtDate" runat="server" clientidmode="Static" xmlns:asp="#unknown"></asp:textbox>
   <script type="text/javascript">


document )。ready( function ()
{
(document).ready(function () {


这篇关于单击鼠标时,必须在文本框中显示自动日期。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆