已采纳回答 / stone310
2个地方 1、47,48行 要这么写,px是字符串连接mychar.style.height=30+'px'mychar.style.width=100+'px';2、72行 mychar.removrAttribute("style");拼写错误了,应该是mychar.removeAttribute("style");
2016-08-16
mychar.style.cssText=("color:red;background-color:#ccc;width:300px;")
2016-08-16
最新回答 / qq_爱做梦的女孩醒不来_0380155
对的,写的都差不多,验证一下是否实现要求。 function openWindow() { var confirmMessage; var openurl; confirmMessage=confirm("你确定要打开新窗口吗?"); if(confirmMessage=true) { openurl=prompt("请输入要打开的网址:","http://www.imooc.com/"); wi...
2016-08-16
var mystr = "你们";
var mychar = "都好吊!";
document.write(mystr+mychar);
var mychar = "都好吊!";
document.write(mystr+mychar);
2016-08-16
本来深深的觉得js学起来很费力,但看完小伙伴们的评论又瞬间感觉js也很so easy!
2016-08-15
最赞回答 / Mr_xrw
你自己把显示的那段代码写错了应该是 mychar.style.display="block";你的是machar.style.display="block";
2016-08-15