0
<!DOCTYPE html>
<html>
<head>
<script>
//if i put window.location= "index.php" here not inside js function it worked but I need it to be inside a function
function newLoad() {
window.location= "index.php"
}
</script>
</head>
<body>
<input type="button" value="press here" onclick="newLoad()">
</body>
</html>
任何想法我怎麼能讓它在JavaScript函數內工作?window.location不工作裏面的js功能
定義_not working_ !! –
沒有指向index.php –
你的代碼應該運行,那麼有什麼不同? – epascarello