开发者

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

开发者 https://www.devze.com 2023-03-06 21:46 出处:网络
Is there any way to assign ASP variable between jquery function is executing? <% txtDescription = Replace(strBody,vbCrLf,\"<br/>\")

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

精彩评论

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

关注公众号