【问题标题】:input field for my website search form does not accept input我的网站搜索表单的输入字段不接受输入
【发布时间】:2012-12-31 03:57:05
【问题描述】:

我的网站是http://1stbirthdaypartytheme.com/ 我的网站搜索表单的输入字段不接受 FireFox 17.01 中的输入。 搜索在 Chrome 和 IE 中正常工作。 换句话说,如果您在 Firefox 中打开我的网站,标题的右上角有一个搜索字段,就在我的社交联系按钮下方。 如果将光标放在输入框中并键入,则不会发生任何事情。 当您单击放大镜时,您将返回主页。 我该怎么做,或者我需要做什么来解决这个问题?

【问题讨论】:

  • 亲爱的 Michael G. Schurmann,请接受 pete 的 答案为正确答案。他一直在努力解决它,这是一种感谢他的方式。

标签: javascript html css


【解决方案1】:

当我在 DOM Inspector 中覆盖这个位时,它开始在 Firefox 中工作:

<SCRIPT TYPE="text/javascript"> 
<!-- 
function disableselect(e){
    return false
} 
function reEnable(){
    return true
} 
document.onselectstart=new Function ("return false") 
if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
}
// -->
</SCRIPT>

也就是说,禁用网页上的“右键单击”只会使调试变得更加困难。不要禁用“右键单击”,这样做没有意义:

How do I disable right click on my web page?

http://www.sitepoint.com/dont-disable-right-click/

【讨论】:

  • 您好,感谢您的帮助,这解决了我的问题,感谢您的帮助和时间。 MGS
【解决方案2】:

此页面存在很多验证错误。我假设其中一些导致该字段出现故障。请通过this validator 运行您的代码并消除错误。

【讨论】:

    猜你喜欢
    • 2021-09-05
    • 2017-03-13
    • 1970-01-01
    • 2022-11-30
    • 2020-01-13
    • 1970-01-01
    • 2017-08-24
    • 1970-01-01
    • 2019-08-01
    相关资源
    最近更新 更多