问题描述:

How to change a drop down name, based on previous drop down in JAVA.

I am new to java so .. not very familiar with it. so asking this question.

There are many questions in this forum discussing on "how to change the contents of one drop down based on previous selection." This question is different.

For example say,

in the first button, say you have asked, which product you own.

If the user selects a game, which is only developed in english.

The second dropdown should be named as the location/country.

If the user selects an Operating system, which has multi lang support. then the next button should be named only as Country.

How could this be done?

网友答案:

you can look to this script and run it in your browser it has the same idea that you can apply to drop down

<head><style type="text/css">  
#style1 {background-color:yellow}  
#style2 {background-color:pink}  
#style1 p{width:300px;height:50px;border:2px solid  
#000;position:absolute;top:60px;left:100px} 
#style2 p{width:100px;border:5px solid #000;position:absolute;top:150px;left:300px} 
</style>  
<script>  
<!--  
function newid(){  
document.getElementsByTagName('body')[0].id="style2"}  
// -->  
</script></head><body id="style1">  
If I have &lt;body id="style1"&gt;<br />  
<a href="#" onclick="javascript:newid()">how</a> can I select the body tag and change the  

id to, for example, style2? <br />
<p>ioend</p>
</body>
相关阅读:
Top