<script
type="text/javascript">
function
dd(val) {
var htm = parent.document.getElementById("product_details").innerHTML
parent.document.getElementById('mask').style.opacity =
"1";
var s =
"\'";
s =
'<li id="'
+ val.id +
'">';
k =
'<li id="'
+ val.id +
'"><div> <div style=" float:left; width:20%;"> ';
k = k +
' <img class=+ "\'"weui_media_appmsg_thumb+ "\'" src=+ "\'"./images/search.png+ "\'"/></div><div><h4 >'
+ document.getElementById(val.id).innerHTML +
'</h4><p>';
k = k +
'数量<input id="sl'
+ val.id +
'" type="number" value="1" style=" border: none" read/>单价<input id="dj'
+ val.id +
'" type="number" value="3" style=" border: none" read/></p></div> </div> </li>';
if (htm.indexOf(s) >
-1) { alert(document.getElementById(val.id).innerHTML +
'存在'); }
else {
parent.document.getElementById("product_details").innerHTML = htm + k;
}
}
function
aaa() {
document.getElementById('p1').style.display =
'block'
var result =
submitAjaxFileds("getBrands.htm", "", "单位", "开户银行", "账号", false);
var $p1 = document.getElementById("p1")
$p1.innerHTML = result;
$p1.querySelectorAll("li").forEach(function (val) {
var sub = parent.document.getElementById("cancel");
var btn = document.getElementById(val.id);
btn.onclick
=
function () {
dd(val);
alert('aaa');
sub.click();
}
});
}
</script>