如何在JS嵌套的ASP语句中调用JS传入变量呢?
kedee 2007-08-30 09:14:15 以下函数是用在下拉select的更改事件中的,用来判断用户发布新闻数量是否超出系统允许的值,如果超出就屏蔽页面上所有的input,textarea,select,禁止提交信息。
但是下面 UserPublicNum 的值可以通过ASP语句获取到,也就是现在这个写法,但是再SQL查询语句("Select Count(id) From News where UserName='"&Session("UserName")&"' and userpage=0")中的userpage=0,这个0应该是函数变量action,我不知道该怎么写这个SQL语句了,请求大侠帮助!!谢谢
<script type="text/javascript">
function CheckStat(container,action)
{
var action
var AllowPublicNum = '1'; //允许的数量
var UserPublicNum = '<%=Get_OtherTable_Value("Select Count(id) From News where UserName='"&Session("UserName")&"' and userpage=0")%>'; //发布的数量
if (AllowPublicNum < UserPublicNum)
{
UnUsedInput() //屏蔽页面上所有的input,textarea,select
}
</script>