简体   繁体   English

提交按钮未出现在Firefox中,但出现在Chrome和Internet Explorer上

[英]Submit button does not appear in Firefox but on Chrome and Internet Explorer

Like the title says, this does not appear on Firefox: 如标题所示,它不会出现在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>

My other submit button for my other form works on Firefox, however: 我的其他表单的其他提交按钮可在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>

Okay, so I tried the closing tags, and turns out that the submit button is hiding under some text and an image. 好的,所以我尝试了结束标记,结果是“提交”按钮隐藏在某些文本和图像下。

Solution: Turns out that I had "overflow: hidden;" 解决方案:原来我有“溢出:隐藏”; in my css file, and that was what made it hidden. 在我的css文件中,这就是隐藏它的原因。 Thanks for the responses. 感谢您的答复。

Gareth could be correct, but I would also check your CSS, jQuery, or something else you have upstream that may be hiding the button. Gareth可能是正确的,但我还将检查您的CSS,jQuery或您上游可能隐藏按钮的其他内容。 The fact that your button isn't visible would tell me that it isn't necessarily a syntax problem. 您的按钮不可见的事实将告诉我它不一定是语法问题。 However, you should do as Gareth suggested and use a self closing tag. 但是,您应该按照Gareth的建议进行操作,并使用自闭标签。

In your form that works you don't have an id associated with your submit button, but you do in your form that doesn't work. 在有效的表单中,您没有与提交按钮关联的ID,但在无效的表单中却没有。 This leads me to believe you probably have something controlling this button either in your CSS, jQuery, AngularJS, etc... If you change your submit button on your form that doesn't work to something like this: 这使我相信您可能在CSS,jQuery,AngularJS等中都可以控制此按钮...如果您更改表单上的提交按钮,则无法执行以下操作:

<input name="submit" type="submit" value="Buy Boost" />

or 要么

<button type="submit">Buy Boost</button>

Do either of these work or at least show the button? 这些工作还是至少显示了按钮?

Sorry, I would have commented but I don't have 50 reputation yet.. 抱歉,我会发表评论,但我没有50的声誉。

Not sure it's causing the problem but recommended to change for valid HTML.. be sure to close your input tags, they're self closing tags so it should be as follows (as in your second form). 不确定是否会引起问题,但建议更改为有效的HTML。请确保关闭输入标签,它们是自闭合标签,因此应如下所示(如第二种形式)。

<input type="x" name="y" /> 

note the forward slash before the last angle bracket 注意最后一个尖括号之前的正斜杠

JSFiddle with valid code - http://jsfiddle.net/62bfj1f0/ 具有有效代码的JSFiddle- http://jsfiddle.net/62bfj1f0/

Hope this helps, Gareth 希望这会有所帮助,加雷斯

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 提交按钮不适用于Chrome或Firefox,但适用于Internet Explorer - The Submit Button doesn't work in Chrome or Firefox, but Works in Internet Explorer 插入Javascript的元素在Firefox和Chrome中显示/更新,但在Internet Explorer 8中不显示/更新 - Javascript inserted elements appear/update in Firefox & Chrome, but not Internet Explorer 8 以编程方式创建的表单无法在Firefox或Internet Explorer中提交 - Programatically Created Form Does Not Submit in Firefox or Internet Explorer 提交按钮上的Internet Explorer 7 onclick事件不会触发 - Internet Explorer 7 onclick event on submit button does not fire chrome,firefox和Internet Explorer中的Ajax和html事件 - Ajax and html events in chrome, firefox and Internet Explorer JS幻灯片可以在Firefox和Chrome上运行,但不能在Internet Explorer上运行吗? - JS slideshow works on firefox and chrome but not internet explorer? 使用Chrome打开Internet Explorer / Firefox等窗口 - Open a Internet explorer/Firefox etc window with Chrome 为什么这在fireFox中有效,但在Chrome或Internet Explorer 9中却无效? - Why is this working in fireFox but not in Chrome or Internet Explorer 9? 网站可以在Firefox和Chrome中运行,但不能在Internet Explorer中运行 - Site works in Firefox and Chrome but not Internet Explorer 后退按钮在Internet Explorer中不起作用,在mozilla firefox和google chrome中工作良好 - back button not working in internet explorer, working good in mozilla firefox and google chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM