JS+ASP 问题有点复杂
ASP函数postmail()如下
function postmail()
....发信
if 成功 then
postmail="发信成功"
else
postmail="发信失败"
end function
然后我在一个button的onclick时间里调用JS函数 post();
function post(){
alert("<%=postmail()%>");
}
我要点过button才会执行发信 但是
页面在载入时就执行了postmail()
因为JS要在客户端解释 所以alert("<%=postmail()%>");要被解释就要执行postmail()
我需要页面载入时不发信 点BUTTON后才发信 大家讨论下怎么解决