Skip to content

Instantly share code, notes, and snippets.

@akiyamaSM
Created August 9, 2019 10:34
Show Gist options
  • Save akiyamaSM/07d9aa4d7b492da2f53351b64fa6f1fa to your computer and use it in GitHub Desktop.
Save akiyamaSM/07d9aa4d7b492da2f53351b64fa6f1fa to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<input type="button" value="next" onclick="change()" />
<script>
function change(){
window.open('second.html', 'popup', 'width=1040,min-height=450,toolbar=no,location=no,directories=no,status=yes,scrollbars=1,menubar=no,resizable=yes')
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<input type="button" value="clickMe" onClick="changeMe()" />
<input type="text" id="changeMe" name="changeMe" />
<script>
function changeMe(){
window.open('first.html', 'popup', 'width=1040,min-height=450,toolbar=no,location=no,directories=no,status=yes,scrollbars=1,menubar=no,resizable=yes')
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<input type="button" value="clickMe" onclick="changeParent()" />
<script>
function changeParent(){
window.opener.opener.document.getElementById('changeMe').value = 'changeeed'
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment