如何让一个输入框<input>默认显示当前时间?
时间:2003-05-22
来源:互联网
<xsl:element name="input">
<xsl:attribute name="type">text</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="field_name"/></xsl:attribute> <xsl:attribute name="class">flat_u</xsl:attribute> <xsl:attribute name="value"></xsl:attribute>
</xsl:element>
怎么样才能使它显示当前时间?而且也可以允许输入
我在a.js中定义:
function getCurrentTime(){
a=new Date();
s=a.getHours() + ":" + a.getMinutes() + ":" + a.getSeconds();
document.write(s);
}
然后在XSL中用:
<xsl:attribute name="value">javascript:getCurrentTime()</xsl:attribute>
发现没起到效果
大家给点思路
<xsl:attribute name="type">text</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="field_name"/></xsl:attribute> <xsl:attribute name="class">flat_u</xsl:attribute> <xsl:attribute name="value"></xsl:attribute>
</xsl:element>
怎么样才能使它显示当前时间?而且也可以允许输入
我在a.js中定义:
function getCurrentTime(){
a=new Date();
s=a.getHours() + ":" + a.getMinutes() + ":" + a.getSeconds();
document.write(s);
}
然后在XSL中用:
<xsl:attribute name="value">javascript:getCurrentTime()</xsl:attribute>
发现没起到效果
大家给点思路
作者: debug 发布时间: 2003-05-22
<xsl:element name="input">
<xsl:attribute name="type">text</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="field_name"/></xsl:attribute> <xsl:attribute name="class">flat_u</xsl:attribute> <xsl:attribute name="value"><xsl:eval>var t=new Date();...</xsl:eval></xsl:attribute>
<xsl:attribute name="type">text</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="field_name"/></xsl:attribute> <xsl:attribute name="class">flat_u</xsl:attribute> <xsl:attribute name="value"><xsl:eval>var t=new Date();...</xsl:eval></xsl:attribute>
作者: imafool 发布时间: 2003-05-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28