在选择下拉菜单上显示/删除文本字段 [英] Displaying/Removing textfield on choice dropdownmenu
问题描述
当我选择一个选项时,我有可能吗? ''依维柯'',让文字/输入字段消失?所以基本上,如果你在第一个dropdownmenu中选择一辆汽车,文本/输入字段必须消失。当前代码:
Hi,
Is it possible for me to, when I choose an option eg. ''Iveco'', to let the text/input field disappear? So basically, if you choose a car in the first dropdownmenu, the text/input field has to disappear. Current Code:
推荐答案
当我选择一个选项时,我有可能吗? ''依维柯'',让文字/输入字段消失?所以基本上,如果你在第一个dropdownmenu中选择一辆汽车,文本/输入字段必须消失。现行代码:
< form action =" zoeken.php" method =" post">
< table background =" img / top.jpg"对齐= QUOT;中心"宽度= QUOT; 780"高度= QUOT; 60"边界=" 0" CELLPADDING = QUOT; 0" cellspacing =" 0"
bgcolor =" #FFFFFF">
< tr>
< td align =" left">< a href =" index2.php?afg = Nee">< img src =" img / Terug.gif" alt =" Terug naar het Overzicht" width =" 39"
height =" 40"边界=" 0" align =" absmiddle">< / a>& nbsp;& nbsp;< a href =" toevoegen.php">< img src =" img / Nieuw.gif" alt =" Rit Toevoegen"
border =" 0" align =" absmiddle">< / a>
& nbsp;< a href =" / vernieuwen">< img src =" img / Refresh.gif"的onClick = QUOT; self.location.reload();" ALT =" Vernieuwen" border =" 0"
align =" absmiddle">< / a>& nbsp;& nbsp;< a href =" printen.php" >< img src =" img / printen.gif" alt =" Overzicht Afdrukken" width =" 39"
height =" 40"边界=" 0" align =" absmiddle">< / a>
< / td>
< td align =" right">< a href = " kenteken.php">< img src =" img / Kenteken.gif" alt =" Auto,Invoerder Toevoegen的司机"
border =" 0" align =" absmiddle">< / a>& nbsp;
< a href =" zoeken.php">< img src =" img / Zoeken.gif" ; ALT =" Zoeken"边界=" 0" align =" absmiddle">< / a>& nbsp;& nbsp;< a
href =" help.php">< img src = QUOT; IMG / Help.gif" ALT = [说明"边界=" 0" align =" absmiddle">< / a>< / td>
< / tr>
< / table>
< table align =" center"宽度= QUOT; 780"边界=" 0" CELLPADDING = QUOT; 4英寸CELLSPACING = QUOT; 0" bgcolor =" #FFFFFF">
< tr class =" titeldatumbalk">
< td colspan =" 4">< strong> ; Zoekfilters< / strong>< / tr>
< tr>
< td width =" 25%"类= QUOT; titelkolombalk"> < p align =" center">
< select name =" a1">
< option value =""已选择已停用> Klik voor opties ...< / option>
< option value =""禁用> < / option>
< option value =" ordernr"> Ordernummer< / option>
< option value =" datum"> Datum< / option>
< option value =" bestemming"> Klant< / option>
< option value =""禁用> < / option>
< option value =" 1"> Trekker en Oplegger< / option>
< option value =" 2"> Bakwagen< / option>
< option value =" 3"> Iveco< / option>
< option value =" 4"> Bus Transport< ; / option>
< option value =" 5"> Ford Mondeo< / option>
< option value =" 13"> Aanhanger< / option>
< option value =" 16"> Svetruck 13.6ton< / option>
< / select>
< br>
< input name =" a"类型= QUOT;文本" ID = QUOT; A"大小= QUOT; 20" maxlength =" 50"
< br>
< br>
< input type ="提交"名称= QUOT;动作" value =" Zoek">
< / p>< / td>
< td width =" 25%"对齐= QUOT;中心" VALIGN = QUOT;顶" class =" titelkolombalk">
< div align =" center">
< select name =" b1">
< option value =""已选择已停用> Klik voor opties ...< / option>
< option value =""禁用> < / option>
< option value =" ordernr"> Ordernummer< / option>
< option value =" datum"> Datum< / option>
< option value =" bestemming"> Klant< / option>
< / select>
< br>
< input name =" b"类型= QUOT;文本" ID = QUOT; B"大小= QUOT; 20" maxlength =" 50"
< / div>< / td>
< td width =" 25%"对齐= QUOT;中心" VALIGN = QUOT;顶" class =" titelkolombalk">
< div align =" center">
< select name =" c1">
< option value =""已选择已停用> Klik voor auto''...< / option>
< option value =""禁用> < / option>
< option value =" 1"> Trekker en Oplegger< / option>
< option value =" 2"> Bakwagen< / option>
< option value =" 3"> Iveco< / option>
< option value =" 4"> Bus Transport< ; / option>
< option value =" 5"> Ford Mondeo< / option>
< option value =" 13"> Aanhanger< / option>
< option value =" svetruck136ton"> Svetruck 13.6ton< / option>
< / select>
< / div>< / td>
< / tr>
< / table>
< / form>
Hi,
Is it possible for me to, when I choose an option eg. ''Iveco'', to let the text/input field disappear? So basically, if you choose a car in the first dropdownmenu, the text/input field has to disappear. Current Code:
<form action="zoeken.php" method="post">
<table background="img/top.jpg" align="center" width="780" height="60" border="0" cellpadding="0" cellspacing="0"
bgcolor="#FFFFFF">
<tr>
<td align="left"><a href="index2.php?afg=Nee"><img src="img/Terug.gif" alt="Terug naar het Overzicht" width="39"
height="40" border="0" align="absmiddle"></a> <a href="toevoegen.php"><img src="img/Nieuw.gif" alt="Rit Toevoegen"
border="0" align="absmiddle"></a>
<a href="/vernieuwen"><img src="img/Refresh.gif" onClick="self.location.reload();" alt="Vernieuwen" border="0"
align="absmiddle"></a> <a href="printen.php"><img src="img/printen.gif" alt="Overzicht Afdrukken" width="39"
height="40" border="0" align="absmiddle"></a>
</td>
<td align="right"><a href="kenteken.php"><img src="img/Kenteken.gif" alt="Auto, Chauffeur of Invoerder Toevoegen"
border="0" align="absmiddle"></a>
<a href="zoeken.php"><img src="img/Zoeken.gif" alt="Zoeken" border="0" align="absmiddle"></a> <a
href="help.php"><img src="img/Help.gif" alt="Help" border="0" align="absmiddle"></a></td>
</tr>
</table>
<table align="center" width="780" border="0" cellpadding="4" cellspacing="0" bgcolor="#FFFFFF">
<tr class="titeldatumbalk">
<td colspan="4"><strong>Zoekfilters</strong></tr>
<tr>
<td width="25%" class="titelkolombalk"> <p align="center">
<select name="a1">
<option value="" selected disabled>Klik voor opties...</option>
<option value="" disabled> </option>
<option value="ordernr">Ordernummer</option>
<option value="datum">Datum</option>
<option value="bestemming">Klant</option>
<option value="" disabled> </option>
<option value="1">Trekker en Oplegger</option>
<option value="2">Bakwagen</option>
<option value="3">Iveco</option>
<option value="4">Bus Transport</option>
<option value="5">Ford Mondeo</option>
<option value="13">Aanhanger</option>
<option value="16">Svetruck 13.6ton</option>
</select>
<br>
<input name="a" type="text" id="a" size="20" maxlength="50">
<br>
<br>
<input type="Submit" name="Action" value="Zoek">
</p></td>
<td width="25%" align="center" valign="top" class="titelkolombalk">
<div align="center">
<select name="b1">
<option value="" selected disabled>Klik voor opties...</option>
<option value="" disabled> </option>
<option value="ordernr">Ordernummer</option>
<option value="datum">Datum</option>
<option value="bestemming">Klant</option>
</select>
<br>
<input name="b" type="text" id="b" size="20" maxlength="50">
</div></td>
<td width="25%" align="center" valign="top" class="titelkolombalk">
<div align="center">
<select name="c1">
<option value="" selected disabled>Klik voor auto''s...</option>
<option value="" disabled> </option>
<option value="1">Trekker en Oplegger</option>
<option value="2">Bakwagen</option>
<option value="3">Iveco</option>
<option value="4">Bus Transport</option>
<option value="5">Ford Mondeo</option>
<option value="13">Aanhanger</option>
<option value="svetruck136ton">Svetruck 13.6ton</option>
</select>
</div></td>
</tr>
</table>
</form>
欢迎来到TSDN ......
有四个函数的llok .... createElement,appendChild ,removeChild
尝试在GOOGLE中搜索...
如果有任何问题,那么再来这里专家在这里.....
$ b $祝你好运.....
亲切的问候,
Dmjpro。
Welcome to TSDN......
have a llok at four functions .... createElement,appendChild,removeChild
Try to search in GOOGLE...
if anything problem is there then come here again experts r here.....
best of luck .....
Kind regards,
Dmjpro.
你不是吗?以为我已经在那里搜索了?另外,我没有在这里发帖。谢谢你的回复。 :)
Didn''t you think that I already searched there? Else I didn''t post here.Thanks for your reply anyway. :)
是的,这是可能的。你给要消失的元素一个id。然后onChange of select你调用一个使用document.getElementById(" theId")并将其样式设置为display:none
Yes it''s possible. You give the element that you want to disappear an id. Then onChange of the select you call a function that uses document.getElementById("theId") and sets its style to "display:none"
这篇关于在选择下拉菜单上显示/删除文本字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!