asp下载其它网站的图片来给html显示
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '缓存图片
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '建立下载对象
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '开始获取图片,http://xxx/png这节可以改成自己要的.其它别动
XML.Send '发送下载请求
Response.AddHeader "Content-Disposition", "attachment;filename=png.png" '设置asp输出类型,不让浏览器当成html显示,现在设置成png
Response.ContentType = "image/png" '显示成png
Response.BinaryWrite XML.responseBody '输出下载好的png内容,用二进制输出
Set XML = Nothing
%>
get_png.asp输出png
<!---图片开始//-->
<!---图片id不能变,但是可以自己加上大小=属性//-->
<img src="get_png.asp" mce_src="get_png.asp" id=png_img>
<mce:script type="text/javascript"><!--
setInterval(
function ()
{
var png_asp = "get_png.asp";//png的asp文件
png_asp += "?t=" + Math.random();//加上时间才可以每次下载新的.
document.getElementById("png_img").src = png_asp;
}
,1000*1);//1000是一秒,*60=于一分钟,可以自己改成想要的时间.
// --></mce:script>
<!---图片结束//-->
xx.htm显示图片,并定时刷新.
相关文档:
ASP.NET中的身份验证(authentication)有哪些
=========================================
Forms身份验证:
通过其可将没有通过身份验证的请求重定向到使用 HTTP 客户端重定向的 HTML 窗体的系统。用户提供凭
据并提交该窗体。如果应用程序验证该请求,系统就会发出包含凭据或密钥的 Cookie 以重新获取该标识
。后续的 ......
ASP。NET中共有几种类型的控件
========================================
两种:
1. 客户端控件,也就是我们在HTML中经常用到的
2. 服务端控件,例如: <asp:TextBox ID="txt" runat="server" />
客户端控件也可以转成服务端控件
<input type="text" id="txt" runat="server" />
HTML 和 WEB
ASP。NET ......
String.prototype.HTMLEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
String.prototype.HTMLDecode = function() {
var temp = doc ......
在Web开发中,常常要用到两个窗口之间互相传值。下面谈谈父子窗口之间的传值:
一:使用Open开启子窗口
1:单值传递
通过open开启的子窗口比较好处理。
页面窗口1.html代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
<form name=" ......
要用ASP来操作SQLite数据库,前提条件是在服务器上得安装SQLite的ODBC驱动程序,可到这个站点上下载安装:http://www.ch-werner.de/sqliteodbc/,安装好后就可以像使用Access一样来使用SQLite了!下边是一个SQLite数据库结构:
引用内容
Create TABLE admin(username text,age integer);
我们再来用ASP演示下如何对SQLi ......