We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Why do "invis" form fields show in "print preview"?

  • 2 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 BigAlBat

more options

I have a couple pages with forms that have an input field which has a class="invis". The field does not show up in the browser. However, it DOES show up in the browser's Print Preview function. I had never noticed this before today. And I tried Print Preview in 8 different browsers and all allow the "invisible" field to be seen. Has anyone else noticed this behavior? Could this be a shortcoming of html or could all browsers possibly be at fault? Or could it even be some other entity to blame? Whatever... it certainly defeats the purpose of "invisible" form fields. Could there even be a work-around? Help... anyone?

I have a couple pages with forms that have an input field which has a class="invis". The field does not show up in the browser. However, it DOES show up in the browser's Print Preview function. I had never noticed this before today. And I tried Print Preview in 8 different browsers and all allow the "invisible" field to be seen. Has anyone else noticed this behavior? Could this be a shortcoming of html or could all browsers possibly be at fault? Or could it even be some other entity to blame? Whatever... it certainly defeats the purpose of "invisible" form fields. Could there even be a work-around? Help... anyone?

所有回复 (2)

more options

Hi BigAlBat, I do not know, what is the css code that makes it invisible? visibility:none or display:none ?

Might want to file a bug in bugzilla.mozilla.org with an example.

Cheers.

more options

The html code is: <input type="text" name="spamtest" class="invis" maxlength="5" size="5" value="Φ∞Σ±ß"> and the css is: input.invis { display:none; }. Don't know if filing a bug report would help since I observed this behavior in 8 different browsers. But in my opinion(for what it's worth, are you listening Mozilla?) a field defined as display:none should not be visible anywhere other than in an offline html editor. I should add here also that it is visible when you "view source" with any browser. What good is having a "display:none" form field that anyone can see?