感谢您参观烂叶子的大树,还请您多多帮忙修枝剪叶,不胜感激~!
javascript 弹出窗口
作者:admin 日期:2005-09-16
一、 基本变化
<SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')
//写成一行
-->
</SCRIPT>
参数解释:
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
100 窗口高度;
width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
Tags: javascript 弹出 窗口
xmlhttp 抓取网页内容2
作者:admin 日期:2005-08-16
抓取网页。偶要实现实实更新天气预报。利用了XMLHTTP组件,抓取网页的指定部分。
需要分件html源代码
此例中的被抓取的html源代码如下
<p align=left>2004年8月24日星期二;白天:晴有时多云南风3—4级;夜间:晴南风3—4级;气温:最高29℃最低19℃ </p>
而程序中是从
以2004年8月24日为关键字搜索,直到</p>结速
而抓取的内容就变成了"2004年8月24日星期二;白天:晴有时多云南风3—4级;夜间:晴南风3—4级;气温:最高29℃最低19℃ "
干干净净的了。记录一下。
xmlhttp让asp实现“多线程”
作者:admin 日期:2005-08-16
xmlhttp 抓取网页内容1
作者:admin 日期:2005-08-16
XMLHTTP抓取远程数据的后期处理
作者:admin 日期:2005-08-16
<%
'作者信息:
'昵称:小灰
'QQ:103895
'http://asp2004.net
'http://blog.csdn.net/iuhxq
hehe = Hello("http://mmsg.qq.com/cgi-bin/gddylist?Type=13&;Sort=1&Page=3", "<html>", "</html>", ".*(<td width=""35%"" bgcolor=""#[\dABCDE]{6}"">(.*)</td>)[.\n]*", "<font style=""font-size:9pt;"" color=blue>$2</font><br>")
response.Write hehe
Function Hello(strUrl, strStart, strEnd, patrn, replStr)
Str = GetBody(strUrl)
Str = MyMid(Str, strStart, strEnd)
Str = ReplaceTest(patrn, replStr, Str)
Hello = Str
End Function
Function MyMid(Str, strstart, strend)
If strstart = "" Then
i = 0
Else
i = InStr(Str, strstart)
End If
If strend = "" Then
j = Len(Str)
Else
j = InStr(i, Str, strend)
End If
MyMid = Mid(Str, i, j - i + 1)
End Function
Function ReplaceTest(patrn, replStr, str1)
Dim regEx, match, matches
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Set matches = regEx.Execute(str1)
For Each match in matches
ReplaceTest = ReplaceTest®Ex.Replace(Match.value, replStr)
Next
End Function
Function GetBody(Url)
Set objXML = CreateObject("Microsoft.XMLHTTP")
With objXML
.Open "Get", Url, False, "", ""
.SEnd
GetBody = .ResponseBody
End With
GetBody = BytesToBstr(GetBody, "GB2312")
Set objXML = Nothing
End Function
Function BytesToBstr(strBody, CodeBase)
Set objStream = Server.CreateObject("Adodb.Stream")
With objStream
.Type = 1
.Mode = 3
.Open
.Write strBody
.Position = 0
.Type = 2
.Charset = CodeBase
BytesToBstr = .ReadText
.Close
End With
Set objStream = Nothing
End Function
%>
其他调用示例:
hehe = Hello("http://list.mp3.baidu.com/song/A.htm";, "<table width=""90%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""0"" bgcolor=""#f5f5f5"" >", "<DIV align=center>", ".*(<td width=""20%""><a href="".*\.htm"" target=_blank>)(.*)(</a></td>)[.\n]*", "<font style=""font-size:9pt;"" color=blue>$2</font><br>")
XMLHTTP的get和post
作者:admin 日期:2005-08-16
//==================================================================
//用XMLHTTP来实现Form的Method=Get.
//==================================================================
我们传统的提交数据的方法都是用<Form>来实现的.
<Form>标记中的Method属性确定了表单元素的数据在发送到服务器时,
如何对HTTP请求信息进行打包.
Method 属性可以使用的方法
Method属性 发送表单元素的方式 读取数据的Request集合
Get 标识在URL的最后 QueryString
Post 在HTTP请求的主体内(HTTP请求的自由区域) Form
这篇文章用XMLHTTP来实现Form的Method=Get.
XMLHTTP 对象及其方法
作者:admin 日期:2005-08-16
MSXML中提供了Microsoft.XMLHTTP对象,能够完成从数据包到Request对象的转换以及发送任务。
创建XMLHTTP对象的语句如下:
Set objXML = CreateObject(Msxml2.XMLHTTP) 或
Set objXML = CreateObject(“Microsoft.XMLHTTP”)
' or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject(MSXML2.ServerXMLHTTP)
对象创建后调用Open方法对Request对象进行初始化,语法格式为:
poster.open http-method, url, async, userID, password
Open方法中包含了5个参数,前三个是必要的,后两个是可选的(在服务器需要进行身份验证时提供)。参数的含义如下所示:
如何获取刚插入的记录中自增长字段的值
作者:admin 日期:2005-08-16
'保存记录
sql1 = "insert into tb_user(loginid,uname,upwd,pid,creattime,ip,quanxian)"
sql1 = sql1 & " values('"& loginid &"','"& uname &"','"&upwd&"','"&subID&"','"&now()&"','"&userip&"',"&quanxian&")"
conn.Execute(sql1)
'获取刚插入记录的ID
set rs = conn.execute("select @@IDENTITY as 'uid'")
if not rs.EOF then
uid = rs("uid")
end if
去掉MSN的自动登陆
作者:admin 日期:2005-04-15
***@**.com登陆]一项。当安装了MSN Messager以后,每次打开MSN的时候,也会自动登陆那个被记住了的用户。***@**.com登陆]一项。当安装了MSN Messager以后,每次打开MSN的时候,也会自动登陆那个被记住了的用户。
去掉的方法:控制面板——>用户帐户——>选择登陆系统时的帐户名,然后左面有个[相关任务],里面有个[管理我的网络密码],进入删除就好了。
打不开网页却可以可以上QQ,可以玩QQ游戏
作者:admin 日期:2005-04-11
2、单击超级链接无任何反应,有可能是因为IE新建窗口模块被破坏所致。
你试一下:
单击“开始→运行”,依次运行“regsvr32 actxprxy.dll”和“regsvr32 shdocvw.dll”将这两个DLL文件注册,然后重启系统。
如果还不行,则可以将mshtml.dll、urlmon.dll、msjava.dll、browseui.dll、oleaut32.dll、shell32.dll也注册一下。





