网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

DW中添加时间的方法Adobe Dreamweaver

时间:2024-10-17 23:36:51

1、用JavaScript定义获取当前系统时间函数,使用网页触发器触发事件。1.在head标签里,<稆糨孝汶;title></title>里面,在样式后面插入脚本:<scriptlanguage=Livescript></script>

DW中添加时间的方法Adobe Dreamweaver

2、输入代码:<SCRIPTlanguage=Livescript>//插入时间脚本today=荏鱿胫协newDate()//创建一个对象document.write("",today.getHours(),":",today.getMinutes());//today.getHours()获取时钟</SCRIPT>&nbsp;<!--插入空格--><SCRIPTlanguage=Livescript>//插入日期脚本today=newDate()//创建一个对象document.write("",today.getMonth()+1,"/",today.getDate(),"/",today.getYear()+1900);//today.getMonth()+1获取月;today.getDate()获取日;today.getYear+1900();获取年</SCRIPT>

DW中添加时间的方法Adobe Dreamweaver

3、最后效果:

DW中添加时间的方法Adobe Dreamweaver
© 2025 一点资料
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com