0
我有了那个消失的onfocus默认值的文本框:文本框的值不刷新
<input data-role="none" class="search-box" id="addressLookupTxt" type="text" value="City and State or Zipcode" onfocus="clearText(this)" onblur="clearText(this)" />
输入文本(即90210)和提交值后,当我回到这个页面输入,提交的值仍然存在。
我怎么能刷新这个值,其默认当我回来吗?
$('#CheckInPage').live('pagebeforeshow', function(toPage, fromPage){});
你见过这样的回答:http://stackoverflow.com/questions/5496301/input-fields-are-retaining-their-values-after-a-page-refresh-how-to-prevent-tha –
假设它不是自动完成的文本(看看@ComputerArts链接到的问题)你应该能够像下面的$('#CheckInPage')那样设置JS中的文本。live('pagebeforeshow',function(toPage ,fromPage){$('#addressLookupTxt')。val(''); });' – Jack