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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -