最赞回答 / 慕先生0274537
<!DOCTYPE html><html> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> <script type="text/javascript"> function openWindow(){ var message = co...
2018-11-14
最新回答 / 慕的地3972799
document.getElementById("txt").style.removeAttribute("style");改成document.getElementById("txt").removeAttribute("style");
2018-11-14
最新回答 / 进击的NickKris
仔细检查差open()的参数,改成如下:window.open( "http://www.imooc.com/","_blank","width=400px, height=500px, toolbar=no, menubar=no")不要随便复制代码,你的href里面的:是中文输入的:
2018-11-14
<script type="text/javascript">
function newopen(){
if(confirm("确定打开新窗口吗?")){
var url=prompt("请输入一个网址:","http://imooc.com/");
window.open(url,"_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400")
}
}
</script>
function newopen(){
if(confirm("确定打开新窗口吗?")){
var url=prompt("请输入一个网址:","http://imooc.com/");
window.open(url,"_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400")
}
}
</script>
function confirm(){ if(confirm("确定要取消设置吗?")){ var mychar=document.getElementById("txt"); mychar.style.color="black"; mychar.style.bakcgroundColor="white"; mychar.style.display="blcok"; mychar.style.width="600px"; mychar.style.height="400px";//样式恢复原样就行了// } }
最新回答 / 一个草根小禹
哥们,你这里<...code...><...code...> 这里的意思是,这个按钮点击下去,调用openWindow()这个,可是你js定义的是function rec(){}所以没有反应啊,而且<...code...>怎么可以这样写,赋值要两...
2018-11-12