52,792
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title></title>
<script language="javaScript" type="text/javascript" src="Script/jquery-1.4.4.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#IDbtn").click(function() {
$.ajax({
type: "POST",
url: "upload.asp",
data: "filedata="+$("#IDfiledata").val() ,
timeout: 2000,
success: function(data) {
alert(data);
$("#showfile").val(eval("("+data+")").msg.url);
}
});
});
});
</script>
</head>
<body>
<input type="text" id="showfile" size="50"><br>
<input type="file" size="13" name="filedata" id="IDfiledata" value="" />
<input type="submit" size="13" name="btn" id="IDbtn" value="提交上传" />
</body>
</html>
<%
dim Refiledata
Refiledata=jsonString(request("filedata"))
response.Write("{'err':'','msg':{'url':'"&Refiledata&"','localname':'Thunder.jpg','id':'1'}}")
function jsonString(str)
str=replace(str,"\","\\")
str=replace(str,"/","\/")
str=replace(str,"'","\'")
jsonString=str
end function
%>