string - Get the date from the meta tag in javascript -
i need date meta on page using javascript:
there 2 dates effective , expires, date need expires.
is there way it? tried string methods, split doesn't work :/
you can data meta tags using queryselector, example author be:
var authortag = document.queryselector('[name=author]'); here's function should want want expires date:
function getexpires() { var expirestag = document.queryselector('[http-equiv=expires]'); try { return expirestag.content; } catch(e) { console.log('unable expires meta content'); return ''; } }
Comments
Post a Comment