as3 与 服务端ASP 通信
var loader:URLLoader = new URLLoader();
var url:URLRequest = new URLRequest("test.asp");
url.method = URLRequestMethod.POST;
var values:URLVariables = new URLVariables();
values.message="hello im flash!";
url.data = values;
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE,loaded);
function loaded(e:Event) {
out1.text=loader.data;
//outPut: phpMessage=im php message!&flashMessage=hello im flash!
out2.text=loader.data.phpMessage;
// im php message!
out3.text=loader.data.flashMessage;
// hello im flash!
out4.text=loader.data.dbMessage;
}
loader.load(url);
程序代码
<%@LANGUAGE="JAVASCRIPT"%>
<%
//接收flash传进来的数据
var flashData;
flashData = Request("message");
//发给flash的数据
var aspMessage;
aspMessage = 'im asp message!';
//数据库的相关操作
//======================================
var conn;
var rs;
var sql;
var strPath;
strPath="test.mdb";
try{
conn = Server.CreateObject("ADODB.Connection");
conn.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath(strPath);
conn.open();
}catch(e){
Response.Write('<meta
http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><div style="font-size:12px;font-weight:bold;border:1px solid
#006;padding:6px;background:#fcc">数据库连接出错,请检查连接字串!</div>');
&nb
相关文档:
add.html
<html>
<head>
<title>无组件上传</title>
</head>
<body>
<form method="POST" name="myform" action="xSave.asp" target="_self">
<input name="PicPath" type="text" id="PicPath" readonly="true">
<input name="sPicPath" type="hidden" id="sPi ......
<script language="javascript">
function CheckAll(form)
{ ///定义函数checkall,参数为form
for (var i=0;i<form.elements.length;i++)
///循环,form.elements.length得到表单里的控件个数
{
///把表单里的内容依依付给e这个变量
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = for ......
(一)如何截取指定区域的HTML代码?
(对方网站的HTML代码在哪儿看?晕:IE浏览器>>查看>>源文件。不要告诉我你不知道IE是什么!),例如我只想获取以下HTML代码中"<td>"和"</td>"之间的的文字部分:
<html>
<title>网站爱好者__http://www.wwwfan.cn</title>
< ......
<!--#include file="zheboconn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>asp和mysql分页代码</title>
<style type="text/css">
<!--
.STYLE3 {
fon ......
探索软件工作室长期专业承接中小型商业软件或网站,最优惠的价格和高质量的服务期待您的惠顾!
本工作室承接 JSP ASP VB PB LotusNotes 等语言要求的应用系统开发业务
java jsp实战源程序代码:
......