如上图所示,如何实现A医院后,在下面弹出的窗口中,只显示A 医院的科室来选择
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
<script type="text/javascript">
window.onload = function() {
if (document.all) {
document.getElementById("txtDepName").attachEvent("onclick", function() {
var hospitalid=document.getElementById("医院编号控件id").value;
window.open("/selectdep.aspx?hospitalid=" + hospitalid,'','height=300;width=400');
});
}
else {
document.getElementById("txtDepName").addEventListener("click", function() {
var hospitalid = document.getElementById("医院编号控件id").value;
window.open("/selectdep.aspx?hospitalid=" + hospitalid, '', 'height=300;width=400');
});
}
}
</script>
然后在selectdep.aspx页面接收"hospitalid",把sql语句加上医院id=hospitalid这个参数值的