如何克服"名"属性错误在严格的XHTML [英] how to overcome "name" attribute error in xhtml Strict

查看:194
本文介绍了如何克服"名"属性错误在严格的XHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的表单我有这个code

in my form i have this code

<form action="mail.php" class="contactForm" name="cform" method="post">

问题是当我确认它告诉我名是不允许在XHTML严格。
有没有办法,我可以使用SOEM别的东西这个。

Problem is when i validate it tells me "name" is not allowed on xhtml strict. is there a way i can use soem thing else for this.

感谢

推荐答案

您应该使用 ID 作为一个唯一的标识符,而不是名称

You should be using id as a unique identifier instead of name.

有没有需要,虽然设置的名称特别的原因?你可以只取出名的声明,除非有它的一个原因。

Is there a particular reason that you need to set the name though? You can just remove the name declaration unless there's a reason for it.

这篇关于如何克服&QUOT;名&QUOT;属性错误在严格的XHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆