<img id="i" src="images/f1.gif" alt="已选定图像" name="showFace">
<script>
alert(i.src)
</script>

解决方案 »

  1.   


    <form method=post name=myform>
    <img src="images/f1.gif" alt="已选定图像" name="showFace">
    <input type=hidden name="ImgSrc">
    <input type=button value="submit" onclick="PostForm();">
    <script>
    function PostForm()
    {
      myform.ImgSrc.value = myform.showFace.src; //先赋值给FORM里的HIDDEN
      myform.action = "xx.aspx";//提交给xx.aspx页面
      myform.submit();
    }
    </script>在xx.aspx页面就可以用Request.Form["ImgSrc"]读取src的值了