2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

jsで戻るボタンを作成した

Last updated at Posted at 2020-03-16

最初はphpでパラメーターに引数を渡して戻るボタンを作成したようと思ったが、jsの方が簡単だった。
バックエンドがphpでjsで戻るボタンを作成したときに、参考にした記事
JavaScriptやPHPで1つ前のページに戻るボタンを設置する

//onclick処理
<input value="前に戻る" onclick="history.back();" type="button">
 
//href属性に設定
<a href="javascript:history.back()">前に戻る</a>
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?