为了账号安全,请及时绑定邮箱和手机立即绑定

新手求解答——哪里的问题,问什么报错??

新手求解答——哪里的问题,问什么报错??

qq_无心_12 2016-01-05 20:48:14
1.<body><frameset cols="250,*" frameborder="0">   <frame src="4.html" name="formFrame" />   <frame src="about:blank" name="resultsFrame" /></frameset></body>2.<script type="text/javascript">var timeDiff;var selectedCity;var daylightSavingAdjust = 0;function updateTimeZone(){    var theCity = document.form1.lstCity;     timeDiff = theCity.options[theCity.selectedIndex].value;    selectedCity = theCity.options[theCity.selectedIndex].text;    updateTime();}function getTimeString(dateObject){    var timeString;    var hours = dateObject.getHours();    if(hours<10)            hours = "0"+ hours;        var nimutes = dateObject.getMinutes();        if(minutes < 10)        minutes = "0"+minutes;        var seconds = dateObject.getMinutes();        if(seconds<10)        seconds = "0"+seconds;        timeString = hours + ":"+minutes +":"+ seconds;        return timeString;}function updateTime(){    var  nowTime = new  Date();    var  resultsFrame = window.top.resultsFrame.document;    resultsFrame.open();    resultsFrame.write("Local Time is "+getTimeString(nowTime)+"<br>");    nowTime.setMinutes(nowTime.getMinutes()+nowTime.getTimezoneOffset()+parseInt(timeDiff)+daylightSavingAdjust);    resultsFrame.write(selectedCity+" time is "+getTimeString(nowTime));    resultsFrame.close();}function chkDaylightSaving_onclick(){    if(document.form1.chkDaylightSaving.checked)    {        daylightSavingAdjust = 60;    }    else    {        daylightSavingAdjust =0;    }    updateTime();}  </script>  </head><body onload="updateTimeZone()"><form name="form1"><select size="5" name="lstCity" onchange="updateTimeZone();">   <option value="60" selected="selected">Berlin</option>   <option value="330">Bombay</option>   <option value="0">London</option>   <option value="180">Moscow</option>   <option value="-300">NewYork(EST)</option>   <option value="60">Pairs</option>   <option value="-480">San Francisco(PST)</option>   <option value="600">Sydney</option></select><p>It's summertime in the selected city and its country adjusts for summertime daylight saving <input type="checkbox" name="chkDaylightSaving"  onclick="return chkDaylightSaving_onclick()" /></p></form></body>
查看完整描述

3 回答

?
qq_无心_12

TA贡献4条经验 获得超0个赞

求指点

查看完整回答
反对 回复 2016-01-05
?
qq_无心_12

TA贡献4条经验 获得超0个赞

为什么还没有人看到,我还没有搞定哦

查看完整回答
反对 回复 2016-01-05
  • 3 回答
  • 0 关注
  • 1313 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信