close

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("button").click(function(){
        $("#google").attr("href", "https://www.google.com/test");
    });
});
</script>
</head>
<body>

<p><a href="https://www.Google.com" id="google">Google.com</a></p>

<button>Change href Value</button>

</body>
</html>
 


arrow
arrow
    創作者介紹
    創作者 Roger 的頭像
    Roger

    歡迎~ 程式設計 學生 作業 專題製作 程式外包 家教...

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