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.
精彩评论