<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="Tokyo" class="tabcontent">
<br>
<a href="file:///C:/xampp/htdocs/final/pop.html" class="a-tag"
target="popup"
onclick="window.open('file:///C:/xampp/htdocs/final/pop.html','popup',`width=600,height=400,top=${window.outerHeight/2 - 250},left=${window.outerWidth/2 - 300}`); return false;">
Click to Upload Files
</a>
</div>
</body>
</html>
當我點擊點擊上傳檔案時,會出現一個彈出視窗。
這是我的彈出視窗:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<input type="file" multiple>
</body>
</html>
每當我關閉彈出視窗時,我都想通過點擊上傳檔案標簽來重繪 我的螢屏。如何實作這一目標?謝謝你。
uj5u.com熱心網友回復:
window.reload()
<form onsubmit="window.reload()">
<input type="file" multiple />
</form>
uj5u.com熱心網友回復:
你可以這樣做:
window.location.reload();
或者你可以使用window.location.href,這個方法再次重新加載頁面。所以你也可以這樣做:
window.location.href = window.location.pathname window.location.search window.location.hash;
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/359478.html
標籤:javascript html
