zoukankan      html  css  js  c++  java
  • html中用js调用ASP文件 实现静态页面动态显示

    html中用js调用ASP文件,实现静态页面动态显示,比如HMTL文章的动态新闻评论等 ---简单版[调用代码,把他放哪儿,就在哪儿显示]-------- <script language="javascript" src="asdf.asp"></script> -----asdf.asp文件---------- <% Response.Write "document.write(""hello"");" '根据自己需要处理相关东西! %> ------------------------------------------------------------------------------- ---复杂版[调用代码,把他放哪儿,就在哪儿显示]-------- <script language="javascript" src="asdf.asp?cname=spell"></script> -----asdf.asp文件---------- <!--#include file="conn.asp"--> <% cname=request.QueryString("cname") turl=request.ServerVariables("URL") sql="select gongsi from company where cname='"+cname+"'" rs.open sql,connstr,1,1 do while not rs.eof Response.Write "document.write("" <table width=100% border=0><tr bgcolor=#ECE9D8> "");" Response.Write "document.write("" <td width=100>" & Rs("gongsi") & "</td> "");" Response.Write "document.write("" </tr><tr height=3></tr></table> "");" 'Response.Write(gsname) rs.movenext loop Response.Write "document.write("""&turl&""");" %>

  • 相关阅读:
    iOS9 HTTP 不能正常使用的解决办法
    IOS UIWebView的一些用法总结
    顺序查找
    循环队列
    队列的链式存储实现
    栈的链式存储实现
    顺序表的实现
    MessageBox函数
    二分法查找
    冒泡排序
  • 原文地址:https://www.cnblogs.com/encounter/p/2189106.html
Copyright © 2011-2022 走看看