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

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

請(qǐng)問這段代碼出現(xiàn)什么問題?為什么無法運(yùn)行?

請(qǐng)問這段代碼出現(xiàn)什么問題?為什么無法運(yùn)行?

我要沖錢 2016-11-12 07:33:17
<!DOCTYPE ?HTML><html>? ? <head>? ? ? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />? ? ? ? <title>函數(shù)</title>? ? ? ? <script type="text/javascript">? ? ? ? ?function openl()//創(chuàng)建數(shù)openl()? ? ? ? ? {? ? ? ? ? var a=document.getElementById("aaa").value;? ? ? ? ? a=a*1; ? ? ? ? ? ? ? ? ? ?//創(chuàng)建變量a,賦值a等于id為“aaa”的文本框中的值,并使a轉(zhuǎn)為數(shù)字型? ? ? ? ? var b=document.getElementById("bbb").value;? ? ? ? ? b=b*1; ? ? ? ? ? ? ? ? ?//創(chuàng)建變量b,賦值a等于id為“bbb”的文本框中的值,并使b轉(zhuǎn)為數(shù)字型? ? ? ? ? var c=document.getElementById("ccc").value; ? ? ? ? ? ? ? ? ?//創(chuàng)建向量c,并賦值c等于id為“ddd”的多選框中的值? ? ? ? ? var d="";//創(chuàng)建變量d? ? ? ? ?? ? ? ? ? ? ? if(ccc==="+")? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ?d=a+b? ? ? ? ? ? ? }? ? ? ? ? ? ? else if(c==="-")? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? d=a-b? ? ? ? ? ? ? }? ? ? ? ? ? ? else if(c==="*")? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? d=a*b? ? ? ? ? ? ? }? ? ? ? ? ? ? else? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? d=a/b? ? ? ? ? ? ? }? ? ? ? ? document.getElementById("ddd").value=d; ? ? ? ? ? ? ?//使id為“ddd”的文本框輸出d? ? ? ? ? }? ? ? ? </script> ? ? ?? ? </head>? ??? ? <body>? ? ? ? <input type="text" id="aaa"/>? ? ? ? <select id="ccc">? ? ? ? ? ? <option value="+">+</option>? ? ? ? ? ? <option value="-">-</option>? ? ? ? ? ? <option value="*">*</option>? ? ? ? ? ? <option value="/">/</option>? ? ? ? </select>? ? ? ? <input type="text" id="bbb"/>? ? ? ? <button onlick="openl()">=</button>? ? ? ? <input type="text" id="ddd"/>? ? ? ??? ? </body></html>
查看完整描述

1 回答

已采納
?
stone310

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

一個(gè)是if(ccc==="+"),變量名寫錯(cuò)了,另一個(gè)是?? <button onlick="openl()">=</button>,onclick寫錯(cuò)了

查看完整回答
反對(duì) 回復(fù) 2016-11-12
  • 1 回答
  • 0 關(guān)注
  • 1242 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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