Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
javascript
phantomjs
01get_titletag_dom.js
01get_titletag_dom.js
/** * Get HTML content from URL * Simple JS DOM usage document.title */ var page = require('webpage').create(), url = 'http://www.mikosoft.info'; page.open(url, function(status) { console.log(status); if(status === 'success') { //status: can be success | fail var title = page.evaluate(function() { return document.title; }); console.log('Page title is: '+title); } else console.log('404 Not found: '+url); phantom.exit(); });
Reload page
Preview
W3C validation
Edit Code
JS Console