html
1 2<!DOCTYPE html> 3<html lang="ja"> 4<head> 5 <meta charset="utf-8"> 6 <title>jQueryの練習</title> 7 8</head> 9<body> 10 <p>jQueryの練習</p> 11 <a href="http://google.com">Google</a> 12 13 <script src="https://code.jquery.com/jquery-3.2.0.min.js"></script> 14 <script> 15 $(function() { 16 console.log($('a').attr('href')); 17 $('a').attr('href', 'http://google.co.jp'); 18 }); 19 </script> 20</body> 21</html> 22
回答3件
あなたの回答
tips
プレビュー