pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    1. <small id='hytqt'></small><noframes id='hytqt'>

        <bdo id='hytqt'></bdo><ul id='hytqt'></ul>

      <i id='hytqt'><tr id='hytqt'><dt id='hytqt'><q id='hytqt'><span id='hytqt'><b id='hytqt'><form id='hytqt'><ins id='hytqt'></ins><ul id='hytqt'></ul><sub id='hytqt'></sub></form><legend id='hytqt'></legend><bdo id='hytqt'><pre id='hytqt'><center id='hytqt'></center></pre></bdo></b><th id='hytqt'></th></span></q></dt></tr></i><div class="bbz3pd7" id='hytqt'><tfoot id='hytqt'></tfoot><dl id='hytqt'><fieldset id='hytqt'></fieldset></dl></div>
      1. <tfoot id='hytqt'></tfoot>
        <legend id='hytqt'><style id='hytqt'><dir id='hytqt'><q id='hytqt'></q></dir></style></legend>

        <選擇>下拉默認值

        lt;selectgt; dropdown default value(選擇下拉默認值)

              <small id='Qnfnn'></small><noframes id='Qnfnn'>

              <tfoot id='Qnfnn'></tfoot>
                <tbody id='Qnfnn'></tbody>
              • <bdo id='Qnfnn'></bdo><ul id='Qnfnn'></ul>
              • <legend id='Qnfnn'><style id='Qnfnn'><dir id='Qnfnn'><q id='Qnfnn'></q></dir></style></legend>
                  <i id='Qnfnn'><tr id='Qnfnn'><dt id='Qnfnn'><q id='Qnfnn'><span id='Qnfnn'><b id='Qnfnn'><form id='Qnfnn'><ins id='Qnfnn'></ins><ul id='Qnfnn'></ul><sub id='Qnfnn'></sub></form><legend id='Qnfnn'></legend><bdo id='Qnfnn'><pre id='Qnfnn'><center id='Qnfnn'></center></pre></bdo></b><th id='Qnfnn'></th></span></q></dt></tr></i><div class="5jjtjxf" id='Qnfnn'><tfoot id='Qnfnn'></tfoot><dl id='Qnfnn'><fieldset id='Qnfnn'></fieldset></dl></div>
                  本文介紹了<選擇>下拉默認值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有這個代碼:

                  if(isset($_POST['search']))
                  {
                      $res1=mysql_query("SELECT * FROM aircraft where acode = '$_POST[ac]'") or die(mysql_error());
                      while($row=mysql_fetch_array($res1))
                      {
                          $airc=$row['acode'];
                          $amode=$row['amodel'];
                          $stat=$row['status'];
                          $rem=$row['remarks'];
                  
                      echo "<center><table><form name="frmMain" method="post"> 
                          <tr><td><font face=consolas><b>Aircraft Code:</b></font></td><td><input type=text name=arc value='$airc' readonly=readonly></td></tr>
                          <tr><td><font face=consolas><b>Aircraft Model:*</b></font></td><td><input type=text name=am value='$amode'></td></tr>
                          <tr><td><font face=consolas><b>Status:*</b></font></td><td><input type=text name=st value='$stat'></td></tr>
                          <tr><td><font face=consolas><b>Remarks:*</b></font></td><td><input type=text name=rm value='$rem'></td></tr></table>";
                      }
                  }
                  

                  在提交搜索"按鈕時,此代碼顯示飛機表中的數(shù)據.允許用戶使用 (*) 符號更新數(shù)據.

                  On submit 'search' button, this code displays the data from aircraft table. The user is allowed to update the data with the (*) sign.

                  由于狀態(tài)默認如下(可用,不可用),我改了這個

                  Since the Status are the following by default (Available, Not Available), I changed this

                   <tr><td><font face=consolas><b>Status:*</b></font></td><td><input type=text name=st value='$stat'></td></tr>
                  

                  至此,

                  <tr><td><font face=consolas><b>Status:*</b></font></td><td><select name=st>
                      <option value=Available>Available</option>
                      <option value='Not Available'>Not Available</option>
                  </select></td></tr>
                  

                  但我希望下拉菜單的默認值取決于$stat=$row['status']; 因為這是一個更新表單.

                  But I want the dropdown to have it's default value depending on $stat=$row['status']; since this is an update form.

                  如果正在檢索的數(shù)據的狀態(tài)為可用",則下拉列表的默認值應為可用".

                  If the data being retrieved has it's status 'Available', then the dropdown should have it's default value as 'Available'.

                  我怎樣才能做到這一點?我試過 <select name=status value='$stat'> 但它不起作用.任何幫助將不勝感激.謝謝!

                  How can I achieve that? I tried <select name=status value='$stat'> but it doesn't work. Any help will be appreciated. Thanks!

                  推薦答案

                  只需將 selected="selected" 放在選項上,具體取決于您的 $row['status'],

                  Just put selected="selected" on the option depending on your $row['status'],

                  <option selected="selected" value="available">Available</option>
                  

                  這篇關于<選擇>下拉默認值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                      <tfoot id='tPSGo'></tfoot>
                        <bdo id='tPSGo'></bdo><ul id='tPSGo'></ul>

                            <tbody id='tPSGo'></tbody>
                          <legend id='tPSGo'><style id='tPSGo'><dir id='tPSGo'><q id='tPSGo'></q></dir></style></legend>
                          • <small id='tPSGo'></small><noframes id='tPSGo'>

                          • <i id='tPSGo'><tr id='tPSGo'><dt id='tPSGo'><q id='tPSGo'><span id='tPSGo'><b id='tPSGo'><form id='tPSGo'><ins id='tPSGo'></ins><ul id='tPSGo'></ul><sub id='tPSGo'></sub></form><legend id='tPSGo'></legend><bdo id='tPSGo'><pre id='tPSGo'><center id='tPSGo'></center></pre></bdo></b><th id='tPSGo'></th></span></q></dt></tr></i><div class="hbb7bzx" id='tPSGo'><tfoot id='tPSGo'></tfoot><dl id='tPSGo'><fieldset id='tPSGo'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 常州律师事务所_常州律所_常州律师-江苏乐天律师事务所 | 重庆轻质隔墙板-重庆安吉升科技有限公司 | 深圳展厅设计_企业展馆设计_展厅设计公司_数字展厅设计_深圳百艺堂 | 新中天检测有限公司青岛分公司-山东|菏泽|济南|潍坊|泰安防雷检测验收 | 塑胶跑道施工-硅pu篮球场施工-塑胶网球场建造-丙烯酸球场材料厂家-奥茵 | 液氮罐_液氮容器_自增压液氮罐_杜瓦瓶_班德液氮罐厂家 | 无锡市珂妮日用化妆品有限公司|珂妮日化官网|洗手液厂家 | 华禹护栏|锌钢护栏_阳台护栏_护栏厂家-华禹专注阳台护栏、楼梯栏杆、百叶窗、空调架、基坑护栏、道路护栏等锌钢护栏产品的生产销售。 | 雾度仪_雾度计_透光率雾度仪价格-三恩时(3nh)光电雾度仪厂家 | 商标转让-商标注册-商标查询-软著专利服务平台 - 赣江万网 | 超声波清洗机_超声波清洗机设备_超声波清洗机厂家_鼎泰恒胜 | 创富网-B2B网站|供求信息网|b2b平台|专业电子商务网站 | 防潮防水通风密闭门源头实力厂家 - 北京酷思帝克门窗 | 外贸网站建设-外贸网站设计制作开发公司-外贸独立站建设【企术】 | 碳化硅,氮化硅,冰晶石,绢云母,氟化铝,白刚玉,棕刚玉,石墨,铝粉,铁粉,金属硅粉,金属铝粉,氧化铝粉,硅微粉,蓝晶石,红柱石,莫来石,粉煤灰,三聚磷酸钠,六偏磷酸钠,硫酸镁-皓泉新材料 | 水平筛厂家-三轴椭圆水平振动筛-泥沙震动筛设备_山东奥凯诺矿机 包装设计公司,产品包装设计|包装制作,包装盒定制厂家-汇包装【官方网站】 | 气象监测系统_气象传感器_微型气象仪_气象环境监测仪-山东风途物联网 | 合肥通道闸-安徽车牌识别-人脸识别系统厂家-安徽熵控智能技术有限公司 | 菏泽商标注册_菏泽版权登记_商标申请代理_菏泽商标注册去哪里 | 全自动实验室洗瓶机,移液管|培养皿|进样瓶清洗机,清洗剂-广州摩特伟希尔机械设备有限责任公司 | 金属抛光机-磁悬浮抛光机-磁力研磨机-磁力清洗机 - 苏州冠古科技 | 砍排机-锯骨机-冻肉切丁机-熟肉切片机-预制菜生产线一站式服务厂商 - 广州市祥九瑞盈机械设备有限公司 | 智能汉显全自动量热仪_微机全自动胶质层指数测定仪-鹤壁市科达仪器仪表有限公司 | 蓝莓施肥机,智能施肥机,自动施肥机,水肥一体化项目,水肥一体机厂家,小型施肥机,圣大节水,滴灌施工方案,山东圣大节水科技有限公司官网17864474793 | 石膏基自流平砂浆厂家-高强石膏基保温隔声自流平-轻质抹灰石膏粉砂浆批发-永康市汇利建设有限公司 | HYDAC过滤器,HYDAC滤芯,现货ATOS油泵,ATOS比例阀-东莞市广联自动化科技有限公司 | 盘扣式脚手架-附着式升降脚手架-移动脚手架,专ye承包服务商 - 苏州安踏脚手架工程有限公司 | 线材成型机,线材折弯机,线材成型机厂家,贝朗自动化设备有限公司1 | 台式低速离心机-脱泡离心机-菌种摇床-常州市万丰仪器制造有限公司 | uv固化机-丝印uv机-工业烤箱-五金蚀刻机-分拣输送机 - 保定市丰辉机械设备制造有限公司 | MES系统工业智能终端_生产管理看板/安灯/ESOP/静电监控_讯鹏科技 | ALC墙板_ALC轻质隔墙板_隔音防火墙板_轻质隔墙材料-湖北博悦佳 | 户外-组合-幼儿园-不锈钢-儿童-滑滑梯-床-玩具-淘气堡-厂家-价格 | 网站建设,北京网站建设,北京网站建设公司,网站系统开发,北京网站制作公司,响应式网站,做网站公司,海淀做网站,朝阳做网站,昌平做网站,建站公司 | KBX-220倾斜开关|KBW-220P/L跑偏开关|拉绳开关|DHJY-I隔爆打滑开关|溜槽堵塞开关|欠速开关|声光报警器-山东卓信有限公司 | 复合土工膜厂家|hdpe防渗土工膜|复合防渗土工布|玻璃纤维|双向塑料土工格栅-安徽路建新材料有限公司 | 东亚液氮罐-液氮生物容器-乐山市东亚机电工贸有限公司 | 精密模具制造,注塑加工,吹塑和吹瓶加工,EPS泡沫包装生产 - 济南兴田塑胶有限公司 | 喷播机厂家_二手喷播机租赁_水泥浆洒布机-河南青山绿水机电设备有限公司 | 电机修理_二手电机专家-河北豫通机电设备有限公司(原石家庄冀华高压电机维修中心) | 空气能采暖,热泵烘干机,空气源热水机组|设备|厂家,东莞高温热泵_正旭新能源 |