顯示具有 Javascript 標籤的文章。 顯示所有文章
顯示具有 Javascript 標籤的文章。 顯示所有文章

2016年7月24日 星期日

go Back in HTML,Javascript

go back button in HTML
<input name="Submit" type="button" onClick="javascript:history.back(1)" value="return" />

go to one page in HTML
<input type="button" value="Home" onclick="self.location.href='home.html'"/>

go to Google website in HTML
<input type ="button" onclick="javascript:location.href='http://www.google.com'" value="go to Google"></input>

go back button in Javascript
window.history.back();

2016年7月21日 星期四

[PHP] How to redirect web page in PHP,Javascript,HTML

Redirect web page in HTML


befor </head>

<meta http-equiv="refresh" content="0;url=http://www.google.com" />


“content=0” means after 0 second, web will redirect to http://www.google.com


Redirect web page in Javascript


In HTML file,you should write to 

<script>document.location.href="http://www.google.com";</script>


Redirect web page in PHP


<?php
    header('Location: http://www.google.com');
    exit;
?>