title: JavaScript runtime error: Object doesn't support property or method 'contains'
body: <p>I have written the below code in Master Page</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
              if (window.location.pathname.contains('Page1.aspx')) {
                  var js = document.createElement("script");
  
                  js.type = "text/javascript";
                  js.src = 'http://code.jquery.com/jquery-1.8.3.js';
  
  
              }
              if (window.location.pathname.contains('Page2.aspx')) {
                  var js = document.createElement("script");
  
                  js.type = "text/javascript";
                  js.src = 'http://code.jquery.com/jquery-1.9.1.js';
  
  
              }    
  
          &lt;/script&gt;
  </code></pre>
  
  <p>In asp.net application, I have three pages page1, page2,page3 which are inherited by the same Master Page. When I am trying to access the page3, it is displaying error:
  "JavaScript runtime error: Object doesn't support property or method 'contains'"</p>