js打开aspx页面并传值
js脚本可以使用函数直接打开指定aspx网页并传值;
例如:
<script type="text/javascript">
var pic_path=document.getElementById("img_main_pic").src;
document.getElementById("div_left").style.height=document.body.offsetHeight;
document.getElementById("div_left").style.width=document.body.offsetWidth-185;
document.getElementById("div_right").style.height=document.body.offsetHeight-30;
function s(h)
{
document.getElementById("img_main_pic").src=h;
pic_path=h;
}
function p()
{
window.open("ImgPrint.aspx?main_pic="+pic_path);
}
</script>
<a href="javascript:p();" id="path" name="path" >打印</a>