慕桂英546537
我在stackoverflow上发现了相同的问题或相关问题有什么办法可以更改输入类型=“日期”格式?我找到了一个简单的解决方案,您不能给出具体的格式,但是可以自定义。HTML代码:
CSS代码:#dt{text-indent: -500px;height:25px; width:200px;}JavaScript代码:function mydate(){ //alert("");document.getElementById("dt").hidden=false;document.getElementById("ndt").hidden=true;}function mydate1(){ d=new Date(document.getElementById("dt").value);dt=d.getDate();mn=d.getMonth();mn++;yy=d.getFullYear();document.getElementById("ndt").value=dt+"/"+mn+"/"+yydocument.getElementById("ndt").hidden=false;document.getElementById("dt").hidden=true;}