遷移元が、formメソッド「post」でサブミットした際に、
遷移先のjクエリーで、その遷移元のURL(?以降のパラメータ等含む)を取得したいのですが、
その方法が見つからずこまっております。
(遷移元が、formメソッド「get」でサブミットした際は、取得できる感触でおります)
書き方が拙く申し訳御座いませんが、
どなたか知恵をお借りできたらと思います。
宜しくお願いします。
追記:
簡易でございますが、下記の状況でおります。
遷移元が下記の場合(『method="get"』)
<form name="form_serach" id="form_serach" method="get" action="http://test-hogehoge.com/item/"> <input type="hidden" name="id" value="2"> <input type="hidden" name="code" value="aa-203"> <input type="hidden" name="page" value="9"> </form> ↓ 遷移先のjクエリー(『$(location).attr('href')』) console.log($(location).attr('href')); ↓ http://test-hogehoge.com/item/?id=2&code=aa-203&page=9 URL全文が取得できる(課題解決)。遷移元が下記の場合(『method="post"』)
<form name="form_serach" id="form_serach" method="post" action="http://test-hogehoge.com/item/"> <input type="hidden" name="id" value="2"> <input type="hidden" name="code" value="aa-203"> <input type="hidden" name="page" value="9"> </form> ↓ 遷移先のjクエリー(『$(location).attr('href')』) console.log($(location).attr('href')); ↓ http://test-hogehoge.com/item/ URL全文が取得できない(課題未解決)。 method="post"でも、パラメタを含めたURL全文を取得したいと思ってます。