怎样屏蔽浏览器后退按钮 急(50分)

F

ff_ff

Unregistered / Unconfirmed
GUEST, unregistred user!
最好给个javascript代码,能运行的,谢了.
 
window.location.replace(URL)
replace(URL) - 促使浏览器根据 URL 参数中给出的地址 (URL) 下载页面,同时在当前浏览器存储的历史记录 (即所浏览过的页面的列表) 中使用新的地址(即此方法中的 URL 参数) 覆盖当前的页面。
使用 replace() 方法意味着用户将不能通过按 “返回” 按钮回到前边浏览过的那个页面,但这并不是说用户完全不能回到原来的所有页面,他们只不过是无法回到被 replace() 方法替换的那一个页面 (注意:只是被替换的那一个页面)。
 
window.history.forward();
怎么使啊?
事关饭碗啊
 
http://www.elook.net.cn/handbook/JavaScript/win1.htm#1187806
forward
Points the browser to the next URL in the current history list;
equivalent to the user pressing the browser's Forward button
方法源 Window
实现版本 Navigator 4.0

语法
history.forward() forward()
参数

描述
This method performs the same action as a user choosing the Forward button in the browser. The forward method is the same as history.go(1).
When used with the Frame object, forward behaves as follows: While in Frame A, you click the Back button to change Frame A's content. You then
move to Frame B and click the Back button to change Frame B's content. If you move back to Frame A and call FrameA.forward(), the content of Frame B changes (clicking the Forward button behaves the same). If you want to navigate Frame A separately, use FrameA.history.forward().

示例
The following custom buttons perform the same operation as the browser's Forward button:
<P><INPUT TYPE=&quot;button&quot;
VALUE=&quot;< Go Forth&quot;
onClick=&quot;history.forward()&quot;>
<P><INPUT TYPE=&quot;button&quot;
VALUE=&quot;> Go Forth&quot;
onClick=&quot;myWindow.forward()&quot;>
 
就是向前的意思。效果相当于window.history.go(-1);
 
接受答案了.
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
顶部