<script type="text/javascript">
var message = "${message}";
if(message.length>0){
alert(message);
}
function showDiv(){
var type="${linkType}";
var selectValue = document.getElementById("selectName");
var div = document.getElementById("back1");
var div1 = document.getElementById("back2");
var div2 = document.getElementById("back3");
if(type!=null){
if(type=="1"){
div.style.display = "block";
selectValue.options[0].text = "aa";
div2.style.display = "none";
div1.style.display = "none";
}
if(type=="2"){
var optionValue = document.getElementById("option2");
// selectValue.text = "教育部专业网站";
// optionValue.text = "教育部专业网站";
//改变select下来源显示的值,但这样做老是不成功,希望有人帮我,当我传的option中的value值不一样时,select显示的value也跟着变化
selectValue.options[1].text = "bb";
div.style.display = "none";
div2.style.display = "none";
div1.style.display = "block";
}
if(type=="3"){
div.style.display = "none";
div1.style.display = "none";
div2.style.display = "block";
selectValue.options[2].text = "cc";
}
}
}
function showFriendLink(num){
var div = document.getElementById("back1");
var div1 = document.getElementById("back2");
var div2 = document.getElementById("back3");
if(num=="1"){
div.style.display = "block";
div2.style.display = "none";
div1.style.display = "none";
}
if(num=="2"){
div.style.display = "none";
div2.style.display = "none";
div1.style.display = "block";
}
if(num=="3"){
div.style.display = "none";
div1.style.display = "none";
div2.style.display = "block";
}
}
</script>
<select id="selectName" name="selectName" οnchange="showFriendLink(this.options[this.selectedIndex].value)">
<option id="option1" value="1">aa</option>
<option id="option2" value="2">bb</option>
<option id="option3" value="3">cc</option>
</select>
var message = "${message}";
if(message.length>0){
alert(message);
}
function showDiv(){
var type="${linkType}";
var selectValue = document.getElementById("selectName");
var div = document.getElementById("back1");
var div1 = document.getElementById("back2");
var div2 = document.getElementById("back3");
if(type!=null){
if(type=="1"){
div.style.display = "block";
selectValue.options[0].text = "aa";
div2.style.display = "none";
div1.style.display = "none";
}
if(type=="2"){
var optionValue = document.getElementById("option2");
// selectValue.text = "教育部专业网站";
// optionValue.text = "教育部专业网站";
//改变select下来源显示的值,但这样做老是不成功,希望有人帮我,当我传的option中的value值不一样时,select显示的value也跟着变化
selectValue.options[1].text = "bb";
div.style.display = "none";
div2.style.display = "none";
div1.style.display = "block";
}
if(type=="3"){
div.style.display = "none";
div1.style.display = "none";
div2.style.display = "block";
selectValue.options[2].text = "cc";
}
}
}
function showFriendLink(num){
var div = document.getElementById("back1");
var div1 = document.getElementById("back2");
var div2 = document.getElementById("back3");
if(num=="1"){
div.style.display = "block";
div2.style.display = "none";
div1.style.display = "none";
}
if(num=="2"){
div.style.display = "none";
div2.style.display = "none";
div1.style.display = "block";
}
if(num=="3"){
div.style.display = "none";
div1.style.display = "none";
div2.style.display = "block";
}
}
</script>
<select id="selectName" name="selectName" οnchange="showFriendLink(this.options[this.selectedIndex].value)">
<option id="option1" value="1">aa</option>
<option id="option2" value="2">bb</option>
<option id="option3" value="3">cc</option>
</select>