已采纳回答 / A凶残的小绵洋
兄弟你最后"取消设置" 里面var closesys= confirm("是否取消设置?");和var closesys = document.getElementById("txt"); 变量名字 重复了 导致之前的全部出错, 建议不要重复起那么多变量名,其实可以把var closesys = document.getElementById("txt"); 这个 放在函数外面, 局部变量变成全局变量,这样下面的函数都可以用了,可以参考下我写的,以后写这样的代码如果不知道哪里错了,可以先把不用的代...
2019-01-10
最赞回答 / DarkMatterr
没问题啦<!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:px;}#txt{ height:400px; width:600px; ...
2019-01-08
最新回答 / 慕圣514155
一、改为onclick="init()",onclick="init1()",onclick="init2()",onclick="init3()",onclick="init4()"二、函数init3()(显示内容的方法),你针对id=four的p标签进行操作,但是它本来就是显示的,你可以改为 var four1 = document.getElementById("three"); 在对id为three的p标签进行隐藏后在使用这个按钮就可以显示内容了...
2019-01-05
最新回答 / 木子955
<script>var answer = confirm("是否要打开新窗口?");var newHeight = window.screen.height/2;var newWidth = window.scree.width/2;if(answer){ window.open("http://www.imooc.com","_blank","width=newWidth,height=newHeight");}</script>
2019-01-04
最新回答 / showmylifeqwe11
<!DOCTYPE html><html> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> <script type="text/javascript"> function openWindow(){ // 新窗口打开时弹出确...
2019-01-04
已采纳回答 / 蓝瑟
我只找到了这2处错误:定义改变宽高的函数里,属性值 300px等等 应该用引号括起来;定义取消设置的函数里,函数名reset可能是什么关键字,不能用做函数名,具体你可以百度一下,换个名字就能实现函数;
2019-01-03
已采纳回答 / 慕瓜6331918
以下是我的代码~~供参考<!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{ height:400px; width:600p...
2019-01-02
已采纳回答 / Wick_L
window.open('http://www.imooc.com','-blank','width=400px,height=500px,menubar=no,toolbar=no') 自己看下哪里错了
2019-01-02