Jquey Ajax访问asp.net后台代码
$.ajax({
type: "POST", //访问WebService使用Post方式请求
contentType: "application/json",
url: "UpdateNews.aspx/InsertLocalImages",
data: "{dirName:'" + UploadPath + "',ImagePath:'" + imgpath + "',ImageName:'" + imgname + "',filetitle:'" + title + "',filedate:'" + date + "',fileexp:'" + exp + "',filekeyw:'" + keyw + "',iscovr:'" + iscovr + "'}",
dataType: 'json',
success: function(result) {//回调函数,result,返回值
if (result.d != "") {
//在光标处插入图片
InsertImage(result.d, id);
Dialog.alert("本地图片入库成功", function() { Dialog.close(); });
}
else {
&
相关文档:
现在主流的网站开发语言无外乎asp、php、asp.net、jsp等。
网页从开始简单的hmtl到复杂的服务语言,走过了10多个年头,各种技术层出不穷,单个的主流技术也在不断翻新的版本,现在分析下各种语言的区别、优势、劣势、开发注意事项!
HTML:当然这是网页最基本的语言,每一个服务器语言都需要它的支持,要学习,这个肯定是开始 ......
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>xmlhttprequest ajax demo</title>
<mce:script type ="text/javascript" language ="javascript" ><!--
var req; //定义变量,用来创建xmlhttprequest对象
function creatReq() // 创建xmlhtt ......
var x,y;
//这是一个通过AJAX取得提示信息的方法
function over(noteContent){
//记录事件发生时的鼠标位置
x = event.clientX;
y = event.clientY;
//显示工具提示
document.getElementById(" ......
Ajax中的返回状态readyState和status,原来没有重视过这两者的关系,结果今天写代码时出差错了。我的原代码为:
function requestSome()
{
url=......
xmlHttpRequest.open....
xmlHttpRequest.onreadystatechange = function responseSome();
xmlHttpRequest.send....
}
function resp ......