提交按钮不会出现在Firefox中,而是出现在Chrome和Internet Explorer上
Submit button does not appear in Firefox but on Chrome and Internet Explorer
就像标题所说,这不会出现在Firefox上:
<form class = "form-buy" action="buy-form.php" method="post">
<input name="lp_current" type="hidden" id="lp-current2">
<input name="server_current" type="hidden" id="server-current2">
<input name="amount" type="hidden" value="" id="divisions-cost">
<input name="discount_amount" type="hidden" value="" id="divisions-cost-discount">
<input name="discount_rate" type="hidden" value="" id="divisions-discount-rate">
<input name="item_name" type="hidden" id="divisions-item-name" value="">
<input name="submit" type="submit" value="Buy Boost" id="divisions-buy-button">
</form>
但是,我的其他表单的另一个提交按钮适用于 Firefox:
form id="contactform" name="contactform" class="contactform" action="contact.php" method="post" onsubmit="return validate('contactform');">
<label class = "col1 first" for="sender"><font color=red>*</font>E-mail:</label>
<input class = "col4" type="text" name="sender" id="sender" />
<div class="clearfix"></div>
<label class = "col1 first" for="IGN">IGN:</label>
<input class = "col4" type="text" name="IGN" id="IGN" />
<div class="clearfix"></div>
<label class="col1 first" for="message"><font color=red>*</font>Message:</label>
<textarea class="col5" rows="5" name="message" id="message"></textarea>
<input type="submit" value = "submit" />
</form>
好的,所以我尝试了结束标签,结果发现提交按钮隐藏在一些文本和图像下。
溶液:事实证明,我的 css 文件中有"溢出:隐藏;",这就是隐藏它的原因。感谢您的回复。
Gareth可能是正确的,但我也会检查你的CSS,jQuery或上游可能隐藏按钮的其他东西。您的按钮不可见的事实会告诉我这不一定是语法问题。但是,您应该按照Gareth的建议进行操作并使用自关闭标签。
在有效的表单中,您没有与提交按钮关联的 ID,但您在表单中不起作用。这让我相信你可能在你的CSS,jQuery,AngularJS等中控制这个按钮。如果您将表单上的提交按钮更改为不起作用的内容,如下所示:
<input name="submit" type="submit" value="Buy Boost" />
或
<button type="submit">Buy Boost</button>
这些方法是否有效或至少显示按钮?
抱歉,我会发表评论,但我还没有 50 的声誉。
不确定它是否导致了问题,但建议更改为有效的 HTML.. 请务必关闭您的输入标签,它们是自闭合标签,因此它应该如下所示(如您的第二种形式)。
<input type="x" name="y" />
注意最后一个尖括号前的正斜杠
使用有效代码的 JSFiddle - http://jsfiddle.net/62bfj1f0/
希望这有帮助,加雷思
相关文章:
- jQuery表单验证适用于Mozilla和Internet Explorer,但不适用于Chrome或Safari
- 输入类型的图像在Internet Explorer中不起作用,但在Chrome和Firefox中起作用
- Javascript片段不适用于Chrome,但适用于Internet Explorer
- 提交按钮不会;不适用于Chrome或Firefox,但适用于Internet Explorer
- Chrome 和 Internet Explorer 无法离线工作,在 Firefox 上工作正常
- JS幻灯片适用于Firefox和chrome,但不适用于Internet Explorer
- 使用Chrome打开Internet Explorer / Firefox等窗口
- getElementsByClassName 在 Google Chrome 和 Internet Explorer 中
- JavaScript脚本适用于Firefox,Chrome,Safari,Internet Explorer< 9,但不
- Javascript 日期在 Internet Explorer 和 Chrome 之间有不同的结果
- 提交按钮不会出现在Firefox中,而是出现在Chrome和Internet Explorer上
- 我的XML文件没有被Google Chrome和Internet Explorer使用
- jquery在Chrome中平滑滚动,而不是在Internet Explorer中
- Cookie代码可在FireFox和Explorer中使用,但不能在Chrome中使用
- JavaScript警报在Firefox中正常工作,但在Chrome和Explorer中不正常
- 如何强制google chrome/firefox使用Internet explorer web浏览器控件
- 如何禁用剪切,复制和粘贴操作的密码框跨所有浏览器,即chrome和Internet Explorer
- 为什么这个下拉列表的排序工作在Internet Explorer,而不是在Chrome
- 如何隐藏地址栏在最新版本(Firefox, chrome和internet explorer)使用javascript窗
- Ajax和html事件在chrome, firefox和Internet Explorer