Home > front end >  O a JS code pop up a window in the middle
O a JS code pop up a window in the middle

Time:10-04

O a JS code pop up a window between

Website redesign to the old site users to jump to the new site,,

Make a prompt window into the old website page will prompt a large window click on the new website,,
How to implement? Baidu search some can not find appropriate

CodePudding user response:

I don't know your specific requirements see


<meta charset="UTF-8">
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;
<meta HTTP - equiv="X - UA - Compatible" content="ie=edge" & gt;
Document
<style>
# a {
Width: 300 px;
height: 200px;
Border: 1 px solid black;
Margin: 200 px auto;
text-align: center;
The line - height: 200 px;
}
The button {
Width: 50 px;
Height: 30 px;
}
</style>

<body>
Jump



<script>
Var BTN=document. GetElementById (" BTN ");
The console. The log (BTN);
BTN. Onclick=function () {
Window. The open (" http://www.baidu.com ");
}
</script>
  • Related