問題描述
在我的 asp 頁面中有一個(gè)文本框名稱ProductName"
In my asp page there is one textbox name "ProductName"
如果我在該文本框中寫入任何內(nèi)容并刷新該頁面,則文本框在 Firefox 中不清晰.但是我在 Internet explore 中打開同一頁面并在文本框中寫入任何內(nèi)容并刷新頁面,我的文本框變得清晰
if i write any thing in that textbox and refresh that page , textbox is not clear in firefox. But i open this same page in Internet explore and write any thing in textbox and refresh the page, my textbox comes clear
為什么文本框在 FireFox 中不清晰?
why textbox not comes clear in FireFox?
這是html代碼
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<input type="text" id="ProductName" name="ProductName" style="width:235; height:20" value="">
</body>
</html>
推薦答案
這是 Firefox 的一個(gè)特性(我非常喜歡).在服務(wù)器端您無能為力.
This is a feature of Firefox (one I'm quite fond of). There's nothing you can do about it on the server-side.
更長(zhǎng)的版本:你可以做一些事情,但它非常混亂.基本上,F(xiàn)irefox 實(shí)現(xiàn)這一點(diǎn)的方式是,當(dāng)用戶點(diǎn)擊刷新按鈕時(shí),它會(huì)重新填充具有相同名稱的表單元素.
The longer version: There is something you can do about, but it's very messy. Basically, the way Firefox implements this is it refills in form elements with the same name when the user hits the refresh button.
解決方法是在每次頁面加載時(shí)更改 HTML 表單元素的 name
屬性.您如何跟蹤更改它們的內(nèi)容也由您自行決定,但我只想說,作為一個(gè) Firefox 用戶,擁有一個(gè)網(wǎng)站會(huì)讓我無休止地?zé)?
The workaround is to change the name
attribute on your HTML form elements every time the page loads. How you keep track of what you change them too is left to your discretion, but let me just say that as a Firefox user myself, having a website do this would annoy me no end.
這篇關(guān)于Firefox中的刷新問題的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!