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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

js三目運(yùn)算報(bào)錯(cuò)問(wèn)題,求指點(diǎn)。不要麻煩if,謝謝各位老師。

js三目運(yùn)算報(bào)錯(cuò)問(wèn)題,求指點(diǎn)。不要麻煩if,謝謝各位老師。

慕前端8664132 2017-05-13 18:41:09
<!DOCTYPE html><html><head> <title>音樂(lè)</title> <meta charset="utf-8"> <meta name="kewords" content="在線聽(tīng)歌,流行音樂(lè),傷感音樂(lè)"> <meta name="descriptions" content="聽(tīng)音樂(lè),聽(tīng)音樂(lè)。我是音樂(lè),我是音樂(lè)"> <meta name="robots" content="all"> <!-- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1, minimun-scale=1"> --> <!-- <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no"> --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="cyan"> <meta name="HandeldFriendly" content="true"> <meta name="format-detection" content="telephone=no"> <meta name="author" content="oyb"> <style> *{ margin:0; padding:0; box-sizing: border-box; list-style: none; } .box{ width:80%; height:200px; margin:100px auto; border:1px solid #ddd; display:-webkit-flex; display:-webkit-box; display:flex; justify-content: space-between; -webkit-justify-content: space-between; } .box .item{ width:50px; height:80px; background:lightcyan; border:1px solid red; } </style></head><body> <div class="box" id="box"> <div class="item">1212</div> <div class="item" id="two"></div> <div class="item">1212</div> <div class="item">aas</div> <div class="item">ggg</div> </div><script>var getT={};getT.now=function(testDate){ //console.log(new Date) var now=new Date; return now;}getT.Week=function(testDate){ //testDate必須是整數(shù)型的 var now=testDate||((new Date()).getDay()); var result; switch(now) { case 0: result="周日" break; case 1: result="周一" break; case 2: result="周二" break; case 3: result="周三" break; case 4: result="周四" break; case 5: result="周五" break; case 6: result="周六" break; } return result;}getT.time=function(habit){ var h=this.now().getHours(); var m=this.now().getMinutes(); if(habit=="習(xí)慣"){ var _h= (h<12) ? return ("上午 "+_h+":"+m): ("下午 "+_h+":"+m)//test-flex.html:104 Uncaught SyntaxError: Unexpected token return //想法:當(dāng)小時(shí)數(shù)h大于12點(diǎn)時(shí)就返回“上午 xx點(diǎn):xx分”,小天12點(diǎn)也是類(lèi)似這樣的情況,現(xiàn)在我不知道我的js三目運(yùn)算法哪里錯(cuò)了,能不用if 就要用,希望各位大神能指點(diǎn)下。 } return h+":"+m;}getT.date=function(){ var m=this.now().getMonth(); var d=this.now().getDate(); return (m+1)+"月"+d+"日"}var box=document.getElementById("box");//console.log(two);//console.log(box.innerHTML);box.innerHTML=getT.time("習(xí)慣");</script></body></html>
查看完整描述

3 回答

?
風(fēng)箏_0010

TA貢獻(xiàn)45條經(jīng)驗(yàn) 獲得超15個(gè)贊

這個(gè)報(bào)錯(cuò)很明顯了。。你那個(gè)return是什么鬼

查看完整回答
1 反對(duì) 回復(fù) 2017-05-14
?
慕前端8664132

TA貢獻(xiàn)20條經(jīng)驗(yàn) 獲得超0個(gè)贊

以上代碼直接運(yùn)行就可以看到控制日志里的錯(cuò)誤了。

查看完整回答
反對(duì) 回復(fù) 2017-05-13
  • 3 回答
  • 0 關(guān)注
  • 2071 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號(hào)

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