我正在尝试使用此功能转到另一个页面
function MButton1Click(event) {
alert("teste2");
window.location("teste.php");
}
但我得到
对象的位置不是函数
我正在尝试使用此功能转到另一个页面
function MButton1Click(event) {
alert("teste2");
window.location("teste.php");
}
但我得到
对象的位置不是函数
// Use this if you want the back button to take you to the current page
window.location.assign("teste.php");
// Use this if you want to remove the current page from the browser's history
window.location.replace("teste.php");
您还可以将赋值简写用于assign
:
window.location = "teste.php";