title: Why I can't get the ClientContext by OM in JavaScript?
body: <p>Here is what I did in my project:  </p>
  
  <pre><code>&lt;asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"&gt;
  &lt;script type="text/javascript"&gt;
    alert("before");
    //It can not work cause the LIST is in the subsite called "Service"
    //var clientContext = SP.ClientContext.get_current();
    var context =new SP.ClientContext("http://sp2010dev1:88/Service/");
    alert(context );  
  &lt;/script&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>But, the alert(context) can not execute ,when I check the concole it showed me <code>TypeError: SP.ClientContext is not a constructor</code>,that is to say there was something wrong with the initialization of ClientContext.  Why?   How can I get ClientContext?  Or was it caused by the lacking of SP.js?</p>
  
  <p>My Final Solution is : Add this statement to the masterpage:  ,and then everything works good!    May this can help you.</p>