最新回答 / 慕圣7331192
                                
                                                            定义名字问题还有一些字符错误已改正dom对象可以全局变量获取简洁代码<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" Content="text/html; charset=utf-8" /><title>javascript</title><style type="text/css">body{font-size:12px;}#txt{    heigh...
                            
                        
                        2019-11-18
                
            
                                最新回答 / 慕婉清5027005
                                
                                                                function openWindow(){       if(confirm("是否打开页面?"))        {        var open=prompt("输入你想要打开的网页");        if(open=="慕课网")        {            window.open("http://www.imooc.com/","width:400","height:500","toolbar:no","menubar:no")        }    }
                            
                        
                        2019-11-06
                
            
                                最赞回答 / _阿善_0
                                
                                                            var msg = confirm('确认将以上所有的设置恢复原始值吗?')if(msg){    document.getElementById('txt').removeAttribute('style')}
                            
                        
                        2019-11-02