English 中文(简体)
显示内容基于选择性的“男子下降”变化
原标题:Display content based on Select Menu dropdown change

在我改变减少的菜单选择时,Im目前利用以下手段展示一个投入领域:

<select id="delivery_country" name="d_country" onchange="
 if (this.selectedIndex==14){
  this.form[ statesUSA ].style.visibility= visible 
 }else {
  this.form[ statesUSA ].style.visibility= hidden 
 };">

然而,这只是修改了称为“状态”的投入形式要素。

如果我要表明,这一形式要素已经存在,我如何这样做?

关于记录,我的超文本如下:

<div id="usa"> <input type="text" id="statesUSA" /> </div>

许多人感谢任何要点。

最佳回答

http://www.cElementById(id)。

因此:

<select id="delivery_country" name="d_country" onchange="if (this.selectedIndex==14){document.getElementById( usa ).style.visibility= visible }else {document.getElementById( usa ).style.visibility= hidden };">
问题回答

暂无回答




相关问题
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!

热门标签