如何在输入文本框中插入deafult值? [英] how can i insert a deafult value in an input text box?
本文介绍了如何在输入文本框中插入deafult值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,如果我有一个盒子,你应该把日期如何保存
今天日期在该盒子里作为默认值?
for example if I have a box where you should put a date how do I keep
today date inside that box as default?
推荐答案
您可以使用PHP的日期函数执行此类操作:
http://us3.php.net/date
You can do something like this, using the date function of PHP:
http://us3.php.net/date
html ="< input type = \" text\"值= \"" .date(QUOT; M-d-Y")"。\" />" ;;
html = "<input type=\"text\" value=\"".date("m-d-Y")."\" />";
dsp ... @ gmail.com写道:
dsp...@gmail.com wrote:
您可以使用PHP的日期功能执行此类操作:
http:/ /us3.php.net/date
You can do something like this, using the date function of PHP:
http://us3.php.net/date
这篇关于如何在输入文本框中插入deafult值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文