开发者

How to assign ASP variable between jquery function on ASP page?

Is there any way to assign ASP variable between jquery function is executing?

<%
txtDescription = Replace(strBody,vbCrLf,"<br/>")
%>
<script type="text/javascript" language="JavaSc开发者_JAVA技巧ript">
    var bodyDefault = '<%=strBodyDefault%>';
    var txtDescription = '<%=txtDescription%>';
    $(document).ready(function() 
    {
      $("#obj_edit_editBox").focus(function()
      {
          if (txtDescription == bodyDefault)
          {
        //Do something here
          }
      });                          
    });
</script>


The ASP variables are vanishes as soon as the server ends generating the page and send it to the client. There (in the client) you can play with javascript and then post back to the server (via POST or GET) to process the info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜