$("img").hover( function(){ $.ajax ( ......... success:function(){ //use a div or others html container to show the response data } ); }, funtion(){ //hide } );
加个div层,在弄个鼠标事件,就可以了,
这个我知道 我不知道怎么和后台交互 csdn 没个能搞出来的吗?
你想要与后台交互什么,用<%# Eval("")%>把datalist中的值取出来不就行了吗
$("img").hover( function(){ $.ajax ( ......... success:function(){ //use a div or others html container to show the response data } ); }, funtion(){ //hide } ); 可以实现, 用样式的相对和绝对定位也可以实现。
function(){
$.ajax
(
.........
success:function(){
//use a div or others html container to show the response data
}
);
},
funtion(){
//hide
}
);
这个我知道 我不知道怎么和后台交互 csdn 没个能搞出来的吗?
function(){
$.ajax
(
.........
success:function(){
//use a div or others html container to show the response data
}
);
},
funtion(){
//hide
}
);
可以实现,
用样式的相对和绝对定位也可以实现。
$("#selPro").change(function() { //省份下拉菜单的change事件
var params = '{str:"' + $(this).val() + '"}'; //此处参数名要注意和后台方法参数名要一致
$.ajax({
type: "POST", //提交方式
url: "CasMenu.aspx/ShowCity", //提交的页面/方法名
data: params, //参数(如果没有参数:null)
dataType: "text", //类型
contentType: "application/json; charset=utf-8",
beforeSend: function(XMLHttpRequest) {
$('#tipsDiv').text("正在查询...");
},
success: function(msg) {
$('#tipsDiv').text("查询成功!");
$("#selCity option").each(function() {
$(this).remove(); //移除原有项
});
$("<option value='0'>===请选择===</option>").appendTo("#selCity"); //添加一个默认项
$(eval("(" + msg + ")").d).appendTo("#selCity"); //将返回来的项添加到下拉菜单中
},
error: function(xhr, msg, e) {
alert("error");
}
});
});
});