今天來講一講框架網頁跳轉的方式
一般來說頁面跳轉方式可能跟底下的一樣
1.<button type="button"><a href="http://localhost/getData/webGui/frame/color/searchId.php" target="_blank" style="text-decoration:none;color:black;">搜尋頁面</a></button>
2.<input type ="button" onclick="javascript:location.href='http://localhost/getData/webGui/frame/color/searchId.php'" value="搜尋頁面"></input>

第一個會開啟額外的新視窗
第二個按鈕的沒辦法讓左右頁面框架跳轉
因此最後使用了這個方法 加入top 變成 top.location

3.<input type="button" onclick="javascript:top.location.href='http://localhost/getData/webGui/frame/color/searchId.php'" value = "搜尋頁面"></input>
如此就能直接跳轉了

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 晨柚 的頭像
    晨柚

    晨柚的部落格

    晨柚 發表在 痞客邦 留言(0) 人氣()