<a id="a_id" href="ttt.htm">xxx</a>
<iframe name="abc"></iframe>
<script>
document.getElementById("a_id").target = "abc";
</script>

解决方案 »

  1.   

    <a id="shishi" href="javascript:selorder()">
    <img src="<%=realpath%>/buttonimages/query.gif"alt="loading..." border="0">
    </a><iframe border=0 name=newjsp  marginwidth=0 framespacing=0 marginheight=0 noresize
                                scrolling="auto"
                                src="customer.do?method=newJspPage" frameborder=0 width=100% height="800"></iframe>代码是这样的,用上老兄的方法没有达到效果啊
      

  2.   

    你a的href里没有url,只是调用selorder();selorder()里怎么写的?
    如果你的意思只是改变iframe的内容,那就和a的target无关了:<a id="shishi" href="javascript:selorder('customer.do?action=selorder')">
    <img src="<%=realpath%>/buttonimages/query.gif"alt="loading..." border="0">
    </a><iframe border=0 name=newjsp  marginwidth=0 framespacing=0 marginheight=0 noresize
    crolling="auto"src="customer.do?method=newJspPage" frameborder=0 width=100% height="800"></iframe><script>
    function selorder(myurl)
    {
    document.frames["newjsp"].location.href=myurl;
    }
    </script>