第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關(guān)于setInterval()的一個小問題

關(guān)于setInterval()的一個小問題

天瑜CJT 2014-07-19 13:20:02
代碼如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>無標題文檔</title><script type="text/javascript">setInterval(attime,1000);function attime(){  var time=new Date();  i=time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();  document.getElementById("showtime").value=i;}setInterval(attime,1000);function attime2(){  var time2=new Date();  i=time2.getHours()+":"+time2.getMinutes()+":"+time2.getSeconds();  document.getElementById("showtime2").value=i;}</script></head><body>現(xiàn)在時間是:<input type="text" size="40" id="showtime" />現(xiàn)在時間是:<input type="text" size="40" id="showtime2" /></body></html>運算后為什么,第二個input沒有顯示任何東西,是被跳過了嗎?還望大神指教
查看完整描述

1 回答

已采納
?
凨亦凌

TA貢獻1條經(jīng)驗 獲得超1個贊

因為你第二個計時器里面調(diào)用的方法的方法名稱錯了,應(yīng)該是setInterval(attime2,1000);才對

查看完整回答
1 反對 回復(fù) 2014-07-19
  • 1 回答
  • 0 關(guān)注
  • 1269 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號