title: Execute JavaScript with MVC3 RAZOR View Engine?
body: <p>I have an Index.cshtml Page in MVC3 Razor View Engine with Following Code:</p>
  
  <pre><code>@{
      ViewBag.Title = "Home Page";
  }
  
  &lt;h2&gt;@ViewBag.Message&lt;/h2&gt;
  
  &lt;label id="lblClickMe" style="cursor:pointer"&gt; Test Java Script Work in MVC Razor&lt;/label&gt; || &lt;label id="lblReset" style="cursor:pointer"&gt; Rest    &lt;/label&gt;
  
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;input type="text" id="txtResult"  style="width:300px"/&gt;
  </code></pre>
  
  <p>And i have some JavaScript in Sane page Like : </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("#lblClickMe").click(function () {
  
          var txtResukt = document.getElementById("txtResult");
          txtResukt.value = "Java script work successfully";
  
      })
  
      $("#lblReset").click(function () {
  
          var txtResukt = document.getElementById("txtResult");
          txtResukt.value = "";
  
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>When I try to load my view give following exception from "lblClickMe" Click Event :</p>
  
  <pre><code>Microsoft JScript runtime error: Object expected
  </code></pre>
  
  <p>Any one fix this bug? </p>