下拉列表

编程入门 行业动态 更新时间:2024-10-25 20:17:32
本文介绍了下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个下拉列表,其中包含城镇选项''Bury''和''Ipswich'',如下所示: 。 选择时其中一个选项,其值传递给变量 $ townsearch。 如何更改下拉列表以便上次选择的选项为 然后是下拉框中显示的当前值? < body> <?php $ townsearch = $ _get [ '' 镇 '']; ?> < form action ="<?php echo $ _SERVER [''PHP_SELF'']; ?>" method =" get"> < select size =" 1" name =" town"> < option> ipswich< / option> < option> bury< / option> & nbsp; < / select>& nbsp; < input type =" submit"值= QUOT; GO" /> < / form> 非常感谢 Alec

I have a drop down list with the town options ''Bury'' and ''Ipswich'' as shown below. When selecting one of the options, its value is passed to variable $townsearch. How do I change the drop down list so the option selected last time is then the current one shown in the drop down box? <body> <?php $townsearch = $_get[''town'']; ?> <form action="<?php echo $_SERVER[''PHP_SELF'']; ?>" method="get"> <select size="1" name="town"> <option>ipswich</option> <option>bury</option> &nbsp; </select>&nbsp; <input type="submit" value="GO" /> </form> Many thanks Alec

推荐答案

townsearch。 如何更改下拉列表以便上次选择该选项是 然后下拉框中显示当前的那个? < body> <?php townsearch. How do I change the drop down list so the option selected last time is then the current one shown in the drop down box? <body> <?php

townsearch = townsearch =

_get [''town'']; ?> < form action ="<?php echo _get[''town'']; ?> <form action="<?php echo

更多推荐

下拉列表

本文发布于:2023-08-05 17:03:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1306835.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!