求一把商品放入购物车的网页特效.如下面订餐的效果
http://www.uunoon.com/ShopMessage.aspx?id=66&MansionId=&MansionName=%E6%9C%AA%E9%80%89%E5%AE%9A&ShopState=0
有用的代码,另开贴高分相送.
http://www.uunoon.com/ShopMessage.aspx?id=66&MansionId=&MansionName=%E6%9C%AA%E9%80%89%E5%AE%9A&ShopState=0
有用的代码,另开贴高分相送.
解决方案 »
- uc_center 怎么设置受保护用户
- Windows不能在本地计算机启动wampapche。
- php获取文本框的值实现点击按钮的分页跳转
- php伪静态相关
- 请教一个关于wordpress插件的简单的问题
- 求 php_memcache.dll 适合php5.3.0 版本的 .急用 在网上找了好久没找都没找到
- $Example_username为什么获取不到值? 【ucenter提问】
- mysql表损坏 急
- mysql 147线程,apache 840线程,内存8G,这是怎么回事;
- 如何搭建自己的博客网站
- php 读xml文件
- 急,在线等待,我想在一个网页中取一段字符串,有点问题请大家指点,谢谢!!1
ShopMenu.js里面
用jquery做的。
一个函数:
function AjaxMenu(pageIndex,updateId,pagerId,url, opts) {
var para = $.extend(options, opts, { pageIndex: pageIndex });
var targerIds = { updateId: updateId, pagerId: pagerId };
//alert(objTostr(opts));
$.ajax({
url: url,
dataType: "json",
data: para,
success: function(msg) {
//alert(objTostr(msg));
if (msg.msg != null || msg.msg != undefined) {
var menu = "<table border='0' cellspacing='0' cellpadding='0'>";
var counter = 3;
var currentHours = new Date().getHours();
var currentMinute = new Date().getMinutes();
$.each(msg.msg.Head, function(i) {
if (counter == 3) {
menu += "<tr>";
}
var exhaustTime = msg.msg.Head[i].ExhaustTime.split(':');
if (msg.msg.Head[i].ExhaustTime == "" || parseInt(currentHours) > parseInt(exhaustTime[0]) || (parseInt(currentHours) == parseInt(exhaustTime[0]) && parseInt(currentMinute) > parseInt(exhaustTime[1]))) {
menu += "<td style='border-bottom:1px dashed #cccccc'><div rel='menuDiv' class='shopListA' onmouseover='this.className=\"shopListB\"' onmouseout='this.className=\"shopListA\"'><div style='padding:2px; border:1px solid #cccccc; width:133px; height:117px;'><img style='width:133px;height:117px;' src='" + msg.msg.Head[i].MenuImage.slice(2) + "' alt='" +
msg.msg.Head[i].MenuName + "' /></div><table><tr><td align='left' width='104'>" +
msg.msg.Head[i].MenuName + "</td><td align='right' width='35'><img onclick='RoleMenuReq(" + objTostr(msg.msg.Head[i]) + ",this)' style='cursor:pointer;' src='images/133.jpg' width='32' height='14'/></td></tr><tr><td align='left'>价格:<span style='color:red;'>" +
msg.msg.Head[i].MenuMoney + "</span>元</td></tr></table></div></td>";
if (counter == 0) {
menu += "</tr>";
counter = 4;
}
counter -= 1;
}
});
menu += "</table>";
//alert(menu);
$("#" + targerIds.updateId).html(menu);
Pager(pageIndex, msg.pageCount, targerIds.updateId, targerIds.pagerId, url, opts, "AjaxMenu");
}
else {
$("#" + targerIds.updateId).html("");
$("#" + targerIds.pagerId).html("");
}
parent.document.getElementById("Header").style.height = $(document).height() + "px";
parent.document.getElementById("Header").style.width = $(document).width() + "px";
},
error: function() {
if (parent.document.getElementById("Header")) {
parent.document.getElementById("Header").style.height = $(document).height() + "px";
parent.document.getElementById("Header").style.width = $(document).width() + "px";
}
},
cache: false
});
}