function openWindow()
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
<script type="text/javascript">
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
2021-01-21
document.write("hello");
document.getElementById("p1").style.color="blue";
document.getElementById("p1").style.color="blue";
2021-01-21
function openWindow(){
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}
<p id="con">JavaScript</p>
<input type='button' value='点击修改'
onmouseover='remov()' onmouseout='remov2()' />
<script type="text/javascript ">
var mychar= document.getElementById('con');
document.write("<br>结果:"+mychar); //输出获取的P标签。
function remov3()
{
<input type='button' value='点击修改'
onmouseover='remov()' onmouseout='remov2()' />
<script type="text/javascript ">
var mychar= document.getElementById('con');
document.write("<br>结果:"+mychar); //输出获取的P标签。
function remov3()
{
2020-12-02