两个图片:点击第一个图片显示提示,点击第二个图片显示提示。我现在的问题:点击第一个图片有提示,点击第二个图片显示的提示接在第一个提示下面,如让点击第二个图片时第一个提示隐藏呢。
下面是脚本:
<script type='text/javascript'>
function setapearance(intitem) {
var details1 = 'details' + intitem;
var details = document.getElementById('details' + intitem);
var receives = document.getElementById('receives' + intitem);
var detailslist = document.getElementById('detailslist' + intitem);
if (detailslist.style.display == "none") {
detailslist.style.display = "block";
receives.style.display = "block";
details.style.display = "none";
}
else {
detailslist.style.display = "none";
receives.style.display = "none";
details.style.display = "block";
}
}
</script>提示内容:<img src="20.gif" id='details101' onclick='setapearance(101)' width="140" height="45" />
<img src="20.gif" id='details102' onclick='setapearance(102)' width="140" height="45" /><tr id='detailslist101' style='display:none;'>
<td colspan='5'>
<table style='margin-left:30px;'>
<tr>
<td><font color='red'>套餐名称</td>
</tr>
<tr>
<td><table style='margin-left:70px;'>
<tbody>
<tr>
<td>《词汇与语法》专项辅导班</td>
</tr>
<tr>
<td>《阅读理解》专项辅导班</td>
</tr>
<tr>
<td>《辨错题》专项辅导班</td>
</tr>
<tr>
<td>《听力题》专项辅导班</td>
</tr>
</tbody>
</table></td>
<tr>
<td> 2、当次考试未通过,免费重学下一次网络课程,保过班优惠价:600元。</td>
</tr>
</table>
</td>
</tr>
<tr id='detailslist102' style='display:none;'>
<td colspan='5'>
<table style='margin-left:30px;'>
<tr>
<td><font color='red'>套餐名称:</font>成人英语三级保过班(全国版)</td>
</tr>
<tr>
<td><table style='margin-left:70px;'>
<tbody>
<tr>
<td>《阅读理解》专项辅导班</td>
</tr>
<tr>
<td>《完形填空》专项辅导班</td>
</tr>
<tr>
<td>《辨错题》专项辅导班</td>
</tr>
<tr>
<td>《翻译题》专项辅导班</td>
</tr>
<tr>
<td>《听力题》专项辅导班</td>
</tr>
<tr>
<td>《对话题》专项辅导班</td>
</tr>
<tr>
<td>《写作题》专项辅导班</td>
</tr></tbody>
</table></td>
<tr>
<td>
<font color='red'>套餐描述:</font></tr>
</table>
</td>
</tr>
下面是脚本:
<script type='text/javascript'>
function setapearance(intitem) {
var details1 = 'details' + intitem;
var details = document.getElementById('details' + intitem);
var receives = document.getElementById('receives' + intitem);
var detailslist = document.getElementById('detailslist' + intitem);
if (detailslist.style.display == "none") {
detailslist.style.display = "block";
receives.style.display = "block";
details.style.display = "none";
}
else {
detailslist.style.display = "none";
receives.style.display = "none";
details.style.display = "block";
}
}
</script>提示内容:<img src="20.gif" id='details101' onclick='setapearance(101)' width="140" height="45" />
<img src="20.gif" id='details102' onclick='setapearance(102)' width="140" height="45" /><tr id='detailslist101' style='display:none;'>
<td colspan='5'>
<table style='margin-left:30px;'>
<tr>
<td><font color='red'>套餐名称</td>
</tr>
<tr>
<td><table style='margin-left:70px;'>
<tbody>
<tr>
<td>《词汇与语法》专项辅导班</td>
</tr>
<tr>
<td>《阅读理解》专项辅导班</td>
</tr>
<tr>
<td>《辨错题》专项辅导班</td>
</tr>
<tr>
<td>《听力题》专项辅导班</td>
</tr>
</tbody>
</table></td>
<tr>
<td> 2、当次考试未通过,免费重学下一次网络课程,保过班优惠价:600元。</td>
</tr>
</table>
</td>
</tr>
<tr id='detailslist102' style='display:none;'>
<td colspan='5'>
<table style='margin-left:30px;'>
<tr>
<td><font color='red'>套餐名称:</font>成人英语三级保过班(全国版)</td>
</tr>
<tr>
<td><table style='margin-left:70px;'>
<tbody>
<tr>
<td>《阅读理解》专项辅导班</td>
</tr>
<tr>
<td>《完形填空》专项辅导班</td>
</tr>
<tr>
<td>《辨错题》专项辅导班</td>
</tr>
<tr>
<td>《翻译题》专项辅导班</td>
</tr>
<tr>
<td>《听力题》专项辅导班</td>
</tr>
<tr>
<td>《对话题》专项辅导班</td>
</tr>
<tr>
<td>《写作题》专项辅导班</td>
</tr></tbody>
</table></td>
<tr>
<td>
<font color='red'>套餐描述:</font></tr>
</table>
</td>
</tr>
var details1 = 'details' + intitem;
var details = document.getElementById('details' + intitem);
//这个details获取不到 html中哪有details101或details102 这两个id
var receives = document.getElementById('receives' + intitem);
//这个receives同样获取不到 html中也没有receives101或receives102 这两个id
var detailslist = document.getElementById('detailslist' + intitem);
if (detailslist.style.display == "none") {
detailslist.style.display = "block";
receives.style.display = "block";
details.style.display = "none";
} else {
detailslist.style.display = "none";
receives.style.display = "none";
details.style.display = "block";
}
}[/align]
var details1 = 'details' + intitem;
var details = document.getElementById('details' + intitem);
//这个details获取不到 html中哪有details101或details102 这两个id
var receives = document.getElementById('receives' + intitem);
//这个receives同样获取不到 html中也没有receives101或receives102 这两个id
var detailslist = document.getElementById('detailslist' + intitem);
if (detailslist.style.display == "none") {
detailslist.style.display = "block";
receives.style.display = "block";
details.style.display = "none";
} else {
detailslist.style.display = "none";
receives.style.display = "none";
details.style.display = "block";
}
}