Trying to create my own Back/Forward buttons in xul.

My Code:

<label value=" ❀ Back " id="back_button" style="-moz-border-radius: 20px; -webkit-border-radius: 20px; -khtml-border-radius: 20px; border-radius: 20px;background:#C93E1D; width:100px; color:white;" onclick="history.go(-1);"></label>

Also tried history.back() onclick of xul button. But nothing happened.

<button label="back" oncommand="history.back();"/>
有帮助吗?

解决方案

This works for me:

document.getElementById("main-browser").webNavigation.goBack();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top