title: How to use javascript with phantomjs
body: <p>I am trying to write with phantomjs
  example:</p>
  
  <pre><code>var webPage = require('webpage');
  var page = webPage.create();
  page.open('http://www.w3school.com.cn',
  function() {
      var res = page.evaluate(function() {
          return document.getElmentsByTagName('a');
      });
      console.log(res);
      phantom.exit();
  });
  </code></pre>
  
  <p>runing,error tip:</p>
  
  <pre><code>TypeError: 'undefined' is not a function (evaluating 'document.getElmentsByTagName('a')')
  
    phantomjs://webpage.evaluate():2
    phantomjs://webpage.evaluate():3
    phantomjs://webpage.evaluate():3
  null
  </code></pre>
  
  <p>why?what did i do?</p>