<a  href="javascript:openUrl('a.jsp')" target="set_content">test</a>function openUrl(obj1) {
                   this.location.href=obj1;
}

解决方案 »

  1.   

    把 target="set_content" 去掉
      

  2.   

    皮皮的再这么改一下应该可以。
    主要是参数的引号和this问题
    <a href="javascript:openUrl('a.jsp')" target="set_content">test</a>function openUrl(obj1) {
    window.location.href=obj1;
    }
      

  3.   

    <a  href="javascript:openUrl(1)" target="_self">test</a>function openUrl(obj1) {
    if(obj1 == "1")
    window.location.href="a.jsp";
    if(obj1 == "2")
    window.location.href="b.jsp";
    }
      

  4.   

    解决拉,谢谢,,
    这样写-----------------------------------------<a href="javascript:openUrl('http://www.163.com');" >test</a>
    <script>function openUrl(obj1)
    {

    document.frames['set_content'].location.replace(obj1);}
    </script>
    <table width="100%" height="100%"><tr>
    <td>
    <iframe id="set_content" name="set_content"></td></tr></table>