- 積分
- 136
- 威望
- 136
- 金錢
- 100
- 最後登錄
- 2014-4-30
|
第二种
形式:[09.06.01] <script>function aDate(date){var year=date.getFullYear().toString().substring(2,4);var month = (date.getMonth() + 1)<10? "0" + (date.getMonth() + 1)date.getMonth() + 1); var day = date.getDate()<10? "0" + date.getDate(): date.getDate();return year+"."+month + "." + day; }var sub= document.getElementById("subject"),date=new Date();var msg=document.getElementById("returnmessage").innerHTML;if(msg.indexOf("发新话题")!=-1){if(sub&&sub.value==""){sub.value="[" + aDate(date) + "]";}}
</script>
複製代碼
就是发帖自动加上日期
要怎么在代码里改成[12.08.00]这样 |
|