Javascript 事件符合 W3C 标准
关于这个 javascript 的一个问题,我想要一个符合 W3C 的版本:但我不知道。 你能帮我吗?对于 HTML 4.01 Transitional Doctype
谢谢
<script Language = "JScript" for = "Player" event = "OpenStateChange(NewState)">
switch(NewState)
{
// Media object open.
case 13:
intervaltime("player")
document.getElementById("temps").innerHTML=parseInt(document.getElementById("Player").currentmedia.duration)
break;
default:
break;
}
</script>
one questio about this javascript, i want a W3C compliant wersion: but i have no idea.
could you help me ? For HTML 4.01 Transitional Doctype
thanks
<script Language = "JScript" for = "Player" event = "OpenStateChange(NewState)">
switch(NewState)
{
// Media object open.
case 13:
intervaltime("player")
document.getElementById("temps").innerHTML=parseInt(document.getElementById("Player").currentmedia.duration)
break;
default:
break;
}
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您看一下 StackExchange 的这篇文章。
Javascript 和 W3C 有效性?
我始终建议不要过于关注 W3C 合规性,尤其是当它来到Javascript。由于您还想使用过渡文档类型,因此它们更加宽松。我并不是说不要完全合规,只是不要为此失眠,如果它适用于所有浏览器那就太好了,您还需要什么!
I would recommend having a gander at this StackExchange post.
Javascript and W3C validity?
I would always recommend not being too obsessive about W3C Compliance, especially when it comes to Javascript. Since you want to use a Transitional doctype as well they are much more loose. I'm not saying don't go for full compliance, just don't lose any sleep over it, if it works in all browsers then excellent, what more do you need!