mirror of
https://github.com/Steffo99/referer.steffo.eu.git
synced 2024-11-21 18:44:20 +00:00
Add window.open test
This commit is contained in:
parent
fe75fe2174
commit
bf4c9a4b97
3 changed files with 21 additions and 0 deletions
5
app.py
5
app.py
|
@ -23,6 +23,11 @@ def location_replace_page():
|
||||||
return f.render_template("locationreplace.html")
|
return f.render_template("locationreplace.html")
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/window/open")
|
||||||
|
def window_open_page():
|
||||||
|
return f.render_template("windowopen.html")
|
||||||
|
|
||||||
|
|
||||||
@app.route('/referer')
|
@app.route('/referer')
|
||||||
def referer_page():
|
def referer_page():
|
||||||
referer = f.request.headers.get("Referer")
|
referer = f.request.headers.get("Referer")
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<li><a href="{{ url_for("link_page") }}">Simple link</a></li>
|
<li><a href="{{ url_for("link_page") }}">Simple link</a></li>
|
||||||
<li><a href="{{ url_for("location_href_page") }}">location.href</a></li>
|
<li><a href="{{ url_for("location_href_page") }}">location.href</a></li>
|
||||||
<li><a href="{{ url_for("location_replace_page") }}">location.replace()</a></li>
|
<li><a href="{{ url_for("location_replace_page") }}">location.replace()</a></li>
|
||||||
|
<li><b><a href="{{ url_for("window_open_page") }}">window.open()</a></b></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
15
templates/windowopen.html
Normal file
15
templates/windowopen.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>location.href</title>
|
||||||
|
<script>
|
||||||
|
function move() {
|
||||||
|
window.open("/referer")
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button onclick="move()">Click on me!</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue