heh

html,vbscript,html中引用asp,js等。ASP转静态(专题)

先引用个例子:

<!--dig.asp-->
<%dim objDB
set objDB = new clsDB
id=request("id")
if id="" then id=19292
objDB.initRs4Read "select top 15 id,title from course where id='"&id&"' order by coursetime desc,id desc"
if objDB.rs.eof then%>
document.writeln('asfsadf')

<%else
while not objDB.rs.eof
%>
document.writeln('·<%=objdb.outputdata("id")%>&nbsp;&nbsp;<%=objdb.outputdata("title")%><br/>')
<%
objDB.rs.movenext
wend
end if
set objDB=nothing
%>

dig.html

<html>
<body>
<script language="vbscript" src="dig.asp"></script>
</body>
</html>

-----------------------------

asp文件中,可以使用的语句是:

document.writeln(' <table width="766" height="100" border="0" cellpadding="0" cellspacing="0" bgcolor="#094F2A">');
  document.writeln('<tbody>');
   <%
   if Session("MID")&""<>"" then
   %>
   document.writeln('<tr>');

-------------


function checkdata()
{
        if (document.formLogin.LoginName.value == "" )
        { alert("请输入用户名!");
   document.formLogin.LoginName.focus();
   }

end function

--------------

document.writeln('<form name="formLogin" method="post" action="<%=locationurl%>/user/user_login.asp" onSubmit="return checkdata()">');
--------------

posted on 2009-01-12 15:13  imwho  阅读(529)  评论(0)    收藏  举报

导航