PayPal表单无法通过XHTML验证 [英] PayPal form failing XHTML validation

查看:80
本文介绍了PayPal表单无法通过XHTML验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试验证我正在处理的页面


<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


它失败了PayPal表格:


< form target =" paypal" ... /> 没有属性target


< input type =" hidden"名称= QUOT; CMD"值= QUOT; _cart" /> 文档类型不允许元素输入这里;缺少p,h1,h2,h3,h4,h5,h6,div,pre,地址"," fieldset"," ins"," del"开始标记。


如何解决这些违法行为?


谢谢。


Helen

I just tried validating the page I''m working on as

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

and it fails on the PayPal form:

<form target="paypal"... /> there is no attribute "target"

<input type="hidden" name="cmd" value="_cart" /> document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

How do I get around these transgressions?

Thank you.

Helen

推荐答案

发布整个paypal代码这里我们可以通过验证器运行它。
Post the whole paypal code here so we can run it through the validator.


target错误就是它。在xhtml中没有这样的东西。我所知道的唯一解决方案是javascript。请访问此处的javascript主板或谷歌。


第二个是告诉我你没有附上< input>在其中一个元素中是必需的。
The "target" error is what it is. There is no such thing in xhtml. The only solution I am aware of is a javascript one. Visit the javascript board here or Google for it.

The second is telling me that you aren''t enclosing the <input> in one of those elements which is required.



在这里发布整个paypal代码,以便我们可以通过验证器运行它。
Post the whole paypal code here so we can run it through the validator.



我查看了粘贴到页面的原始PayPal html代码,最后没有''/>''?我不知道那个括号叫什么?所以看起来该网站的设计者只是将''<> ...< />''改为''< ... />''。以下是查看购物车按钮的代码:


< li>

< form target =" paypal"行动= QUOT; HTTPS://www.paypal.com/cgi-bin/webscr" method =" post">

< input type =" hidden"名称= QUOT; CMD"值= QUOT; _cart" />

< input type =" hidden"名称= QUOT;商业"值= QUOT; business@address.co.uk" />

< input type =" image" SRC ="图像/存储/ view_cart.gif"命名= [提交" alt ="使用PayPal付款 - 它快速,免费且安全! />

< input type =" hidden"名称= QUOT;显示"值= QUOT 1 QUOT; />

< / form>

< / li>


这是一个列表项,因为它显示在内部链接下方的侧边菜单中。



以下是添加到购物车按钮的代码:


< form target =" paypal"行动= QUOT; HTTPS://www.paypal.com/cgi-bin/webscr" method =" post">

< input type =" image" style =" vertical-align:bottom" SRC ="图像/存储/ addtobasket.gif"边界=" 0"命名= [提交" alt ="使用PayPal付款 - 它快速,免费且安全! />

< img alt ="添加"边界=" 0" SRC =" HTTPS://www.paypal.com/en_GB/i/scr/pixel.gif"宽度= QUOT 1 QUOT;高度= QUOT 1 QUOT; />

< input type =" hidden"命名= QUOT;新增]值= QUOT 1 QUOT; />

< input type =" hidden"名称= QUOT; CMD"值= QUOT; _cart" />

< input type =" hidden"名称= QUOT;商业"值= QUOT; owner@address.co.uk" />

< input type =" hidden"命名= QUOT; ITEM_NAME" value =" Fairy Weaver puppet set" />

< input type =" hidden"命名= QUOT;&ITEM_NUMBER QUOT;值= QUOT; _0094" />

< input type =" hidden"名称= QUOT;量QUOT;值= QUOT; 89.36" />

< input type =" hidden"名称= QUOT; no_shipping"值= QUOT; 2英寸/>

< input type =" hidden"命名= QUOT; no_note"值= QUOT 1 QUOT; />

< input type =" hidden"名称= QUOT; CURRENCY_CODE"值= QUOT; GBP" />

< input type =" hidden"名称= QUOT; BN"值= QUOT; PP-ShopCartBF" />

< label> Fairy Weaver Puppet Set< / label>

< / form>


此表在< div>中浮动。我认为应该删除''border =" 0"''属性,不应该吗?我已经从查看购物车表单中删除了它们,我认为它们无论如何都不会有所作为。



谢谢。


Helen

I looked at the original PayPal html code for pasting into the page and it doesn''t have the '' />'' at the end ? I don''t know what that bracket is called ? so it looks as if the designer of the site simply changed the ''<>...</>'' to ''<... />''. Here is the code for the ''view cart'' button:

<li>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="business@address.co.uk" />
<input type="image" src="images/store/view_cart.gif" name="submit" alt="Make payments with PayPal - it''s fast, free and secure!" />
<input type="hidden" name="display" value="1" />
</form>
</li>

It''s all a list item because it appears in the side menu beneath the internal links.



Here is the code for the ''add to cart'' button:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" style="vertical-align: bottom" src="images/store/addtobasket.gif" border="0" name="submit" alt="Make payments with PayPal - it''s fast, free and secure!" />
<img alt="Add " border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="owner@address.co.uk" />
<input type="hidden" name="item_name" value="Fairy Weaver puppet set" />
<input type="hidden" name="item_number" value="_0094" />
<input type="hidden" name="amount" value="89.36" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="bn" value="PP-ShopCartBF" />
<label>Fairy Weaver Puppet Set</label>
</form>

This form is floating loose within a <div>. I think the ''border="0"'' attributes should be removed, shouldn''t they? I already removed them from the ''view cart'' form, and I don''t think they make a difference in any case.


Thank you.

Helen


这篇关于PayPal表单无法通过XHTML验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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