For Each dr As DataRow In drs
Dim txt As String = "<p>发布日期:" & dr("发布日期") & "<br/>"
' With .AddList(dr("菜品名称"), "./Attachments/" & dr("菜品图片") , "renamecx_name.htm?name=" & dr("_Identify"))
With .AddList(dr("菜品名称"), "./Attachments/" & dr("菜品图片"))
.TextStyle = "color:black;font-size:17px;text-align: center;" '字体颜色,字体大小
.ImageWidth = 100 '图片大小
With .LeftFooter
.AddFoot(dr("菜品价格") & "元" & dr("单位")).Attribute = "style='color:red;font-size:13px'"
End With
Dim ipg As ExWeUI.ExInputGroup = ExWeUI.WebUI.AddInputGroup("", "ipg" & dr("菜品名称"), "")
With ipg.AddSpinner("sp_" & dr("菜品名称"), "数量")
.max = 20
.min = 0
' .Attribute = "style='color:red;font-size:10px'"
.width = 65 '整体控件的宽度(含加减按钮)
.Attribute = "style=""width:30px;color:red;font-size:10px"" & openid & "','" & dr("菜品名称") & "')"""
'.Attribute = "style=""width:30px;color:red;font-size:15px"" on change=""submitAjaxFileds('接收页面.htm?openid=" & openid & "','','订单编号控件ID','加减控件ID','订单编号',false);"""
End With
' .RightFooter.AddFoot("").Attribute = ipg.BuildHtml
.RightFooter.AddFoot(ipg.BuildHtml)
End With
Next
js内容:
function setColor(){ //为了显示内容的横向底色可以满屏幕(4)
var eles = document.querySelectorAll(".exui-list-other");
for (let i = 0, k = eles.length; i < k; i++) {
eles[i].firstChild.style.width = "100%";
}
eles = document.querySelectorAll("[id^=ipg] .weui_label");
for (let i = 0, k = eles.length; i < k; i++) {
// eles[i].style.width = "40px";
//eles[i].style.f;
eles[i].style.display = 'none'; //隐藏数量标题
}
}
function sendJsonObject(openid,cpmc){ //向后台发送数据
var obj=new Object();
obj.openid = openid;
obj.cpmc=cpmc;
var cpsl = document.getElementById("sp_"+cpmc); //菜品数量
console.log(cpsl.value);
obj.cpsl=cpsl.value;
var result = sendAjaxJSON(obj,"receive.htm","",false);
}