LoginSignup
2
2

More than 5 years have passed since last update.

head内の記述を書き換える

Last updated at Posted at 2018-03-07

head内のcopyrightを書き換えるためのもの
(いつ使うのか、よくわからない…)
SEO的に、copyrightが空白の時に書き換えを行ったらどういう判定を行うのだろうか…
head内のものであれば、応用が利くので自分用メモということで。

qiita.js
$(function(){
    var x = document.head.children;
    var y = x.length;
    for(var i = 0;i < y;i++){
    var proper = x[i].getAttribute('name');
    if(proper === 'copyright'){
            var z = x[i];
            z.setAttribute('content','©Copyright ');
        }
    }
   }
);
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2