不显示
<body>
<p id="ee">java</p>
<h2>wrojfdlk</h2>
</body>
<script>
var mydd = document.getElemtenById("ee");
document.write("yiqian:"+mydd.innerHTML);
mydd.innerHTML="script";
document.write("xianzai:"+mydd.innerHTML);
</script>
<body>
<p id="ee">java</p>
<h2>wrojfdlk</h2>
</body>
<script>
var mydd = document.getElemtenById("ee");
document.write("yiqian:"+mydd.innerHTML);
mydd.innerHTML="script";
document.write("xianzai:"+mydd.innerHTML);
</script>
2019-09-24
答案:
function openWindow(){
var flag = confirm("是否打开?");
if(flag == true)
{var myk=prompt( "请输入网址:","http://www.imooc.com/");
if(myk){window.open( "http://www.imooc.com/","_blank","toolbar=no, menubar=no, width=400, height=500");}
else{alert("取消打开新窗口")}}
else{document.write("null")}}
function openWindow(){
var flag = confirm("是否打开?");
if(flag == true)
{var myk=prompt( "请输入网址:","http://www.imooc.com/");
if(myk){window.open( "http://www.imooc.com/","_blank","toolbar=no, menubar=no, width=400, height=500");}
else{alert("取消打开新窗口")}}
else{document.write("null")}}
function openWindow(){
var a=confirm('新窗口是否打开')
if(a){ window.open('http://www.imooc.com/','width=400,height=500,menubar=no,toolbar=no,status=no,scroolbars=no')
}
}
var a=confirm('新窗口是否打开')
if(a){ window.open('http://www.imooc.com/','width=400,height=500,menubar=no,toolbar=no,status=no,scroolbars=no')
}
}
定义"取消设置"的函数function quxiao(){var set=confirm("是否恢复设置"); if(set==true) { var mychar4=document.getElementById("txt");mychar4.style.hight="400px";mychar4.style.width="600px";
mychar4.style.color="black";
mychar4.style.backgroundColor="white";
mychar4.style.display="block"}}
mychar4.style.color="black";
mychar4.style.backgroundColor="white";
mychar4.style.display="block"}}
这个「不会了」提示内容里的( 宽为600,高为400,是写反了,写成高为600(height=600了应该是(//height=400//这样才对)宽也是!
2019-09-11
<form>
<input type="button" value="点击我" onclick=" contxt() " />
</form>
<input type="button" value="点击我" onclick=" contxt() " />
</form>
2019-08-28
完美!成功实现!
<script type="text/javascript">
function openWindow(){
var windownew=confirm("将打开新窗口,是否确认?");
if(windownew==true)
{window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')}
else
{null}
}
</script>
<script type="text/javascript">
function openWindow(){
var windownew=confirm("将打开新窗口,是否确认?");
if(windownew==true)
{window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')}
else
{null}
}
</script>
<input type="button" onclick=cancer() value="取消设置" >
function cancer(){
var message=confirm("取消操作?")
if( message == true)
{txt.removeAttribute("style");}
else
{return}
}
function cancer(){
var message=confirm("取消操作?")
if( message == true)
{txt.removeAttribute("style");}
else
{return}
}