Share this page 

Read a META variableTag(s): Language


<META NAME="Real's HowTo" CONTENT="http://www.rgagnon.com/">
<TITLE>Real's Javascript How-to</TITLE>
<SCRIPT>
function checkMeta() {
  var metas = document.getElementsByTagName('META');
  var i;
  for (i = 0; i < metas.length; i++)
    if (metas[i].getAttribute('NAME') == "Real's HowTo")
      break;
  var TestVar = metas[i].getAttribute('CONTENT');
  alert(TestVar);
}
checkMeta();
</SCRIPT>