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

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

嘗試在 html 和 php 中創(chuàng)建下拉列表時(shí)出現(xiàn)未知問(wèn)題

嘗試在 html 和 php 中創(chuàng)建下拉列表時(shí)出現(xiàn)未知問(wèn)題

PHP
哈士奇WWW 2021-07-06 13:51:54
制作一個(gè)新工具并需要一個(gè)下拉菜單,但它似乎不像我編碼的那樣工作。不確定到底是什么問(wèn)題。已經(jīng)在網(wǎng)上研究過(guò),但我一直無(wú)法弄清楚。if(!isset($_POST["ReasonList"])) {  $error .= '<p><label class="text-danger">Please select a reason</label></p>'; }<div class="form-group"><label>Select Reason for Request</label><select id="ReasonList" name="ReasonList" class="form-control" value="<?php echo $ReasonList; ?>" />  <option value = "">Select...</option>  <option value = "1">Original Engineer has left the company</option>  <option value = "2">Actively involved in field work on customer site</option>  <option value = "3">No capacity due to customer mandated deadlines</option>  <option value = "4">Exception request by manager</option></select></div>如果選擇了選項(xiàng),則可以提交表單。如果沒(méi)有選擇選項(xiàng),它會(huì)在 if 語(yǔ)句中給出錯(cuò)誤 - 請(qǐng)選擇一個(gè)原因
查看完整描述

1 回答

?
慕的地6264312

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

查看更正后的<select>元素,以及代碼縮進(jìn)如何使 HTML 更易于閱讀和調(diào)試。


<div class="form-group">

    <label>Select Reason for Request</label>

    <select id="ReasonList" name="ReasonList" class="form-control">

        <option value = "">Select...</option>

        <option value = "1">Original Engineer has left the company</option>

        <option value = "2">Actively involved in field work on customer site</option>

        <option value = "3">No capacity due to customer mandated deadlines</option>

        <option value = "4">Exception request by manager</option>

    </select>

</div>

該<select>元素沒(méi)有value屬性,并且您不小心關(guān)閉了<select>beforename屬性。


查看完整回答
反對(duì) 回復(fù) 2021-07-16
  • 1 回答
  • 0 關(guān)注
  • 166 瀏覽

添加回答

舉報(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)