English 中文(简体)
我怎么能掩盖一个超文本的领域?
原标题:How can I hide one field of an HTML form?
  • 时间:2011-01-28 20:05:05
  •  标签:
  • html
  • forms

我有一个简单的超文本格式,用于推动网站搜索Im网站。

其中两个领域不应一起使用,例如汽车的“ake”和“模仿”。 例如,你不想有人寻找“Ford Ram卡车”。

我如何修改我的形式,以便如果选定一个领域的某些价值,另一个领域就会消失?

感谢你的帮助!

<select name="make">
  <option value="item 1">item 1</option>
  <option value="item 2">item 2</option>
</select>

<select name="model">
  <option value="item 1">item 1</option>
  <option value="item 2">item 2</option>
</select>

<input name="" type="submit" />
问题回答

你们需要使用javascript,并了解无线电信 but的变化。

在你的 j中,你可以把任何形式要素的可见度定在隐蔽或可见(取决于你的意愿)。

您仍需对服务器方面进行验证/核对,以避免进行这种搜索(因为 j印可能被脱掉,或者恶意使用者可能凌驾于客户方验证之上)。

I think Chained Select Menu can solve your problem.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签