国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > JavaScript > 正文

javascript+ajax實(shí)現(xiàn)產(chǎn)品頁(yè)面加載信息

2019-11-20 12:04:34
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

js

//加載頁(yè)面//加載產(chǎn)品列表function GetProductList() {  function PostParam(param) {    param.key = "lm324";    return param;  }  var PostExecParam = {    ClassName: "AnxinE.BLL.Product.ProductInfoBLL",    MethodName: "Search",    ParamModelName: "AnxinE.Model.Product.ProductInfoParam",    onRequest: PostParam,    onResponse: function (result) {      if (result != null) {        var html = "";        //匯率判斷        //<td>" + (result.SupplierProductList[i].ProductList[j].PriceUSD.toString() == '0' ? 1 : result.SupplierProductList[i].ProductList[j].USDPriceList[0].MinQuantity) + ":" + result.SupplierProductList[i].ProductList[j].PriceUSD + "</td>        //展示搜索-產(chǎn)品信息列表        for (var i = 0; i < result.SupplierProductList.length; i++) {          for (var j = 0; j < result.SupplierProductList[i].ProductList.length; j++) {            //if (result.SupplierProductList[i].ProductList[j].PriceUSD!=null) {            //}            html += "<tr><td>" + result.SupplierProductList[i].ProductList[j].Model + "</td><td>" + result.SupplierProductList[i].ProductList[j].Manufacturer + "</td><td>" + (result.SupplierProductList[i].ProductList[j].Quantity) + "</td><td>" + result.SupplierProductList[i].ProductList[j].ShipDays + "</td><td>" + result.SupplierProductList[i].ProductList[j].MinOrderQuantity + "+</td><td>" + result.SupplierProductList[i].ProductList[i].DeliveryPoint + "</td><td>" + result.SupplierProductList[i].ProductList[j].PriceUSD + "</td><td>" + result.SupplierProductList[i].ProductList[j].PriceCNY + "</td><td><a href=''>加入購(gòu)物車</td></tr><br/>";          }        }        //展示搜索--品牌列表        var html2 = "<h2 class='cur1'>全部</h2>";        if (result.ManufacturerList.length > 0) {          for (var i = 0; i < result.ManufacturerList.length ; i++) {            if (result.ManufacturerList[i].KeyName != null) {              if (i < 5) {                html2 += "<h2 href='javascript:void(0);' id='" + result.ManufacturerList[i].KeyName + "' onclick='Trademark(this)' >" + result.ManufacturerList[i].KeyName + "</h2>";              }            }          }          //<a href="javascript:void(0);" id="regain_r2">收回</a>          html2 += "<a href='javascript:void(0);' id='more_r2' onclick='More_r2()'>更多+</a>";        }        //不刪除第一個(gè)內(nèi)容,將產(chǎn)品信息表追加        $("#r2_text2").not($(".cur1")).empty();        $("#r2_text2").append(html2);        //改寫品牌行        $(".tr3").empty();        $(".tr3").append(html);      }    }  };  $.ajaxRequest(PostExecParam);};

.cshtml

<div class="secect_r">    <div class="top_right">      <ul>        <li class="list1"><img src="~/MvcImages/ycysqd/sx_03.gif" /><p>篩選</p></li>        <li class="list2"><a href="">集成電路</a>>></li>        @*<li class="list3"><a>INFINEON</a><span>×</span></li>        <li class="list3"><a>100-1000件</a><span>×</span></li>        <li class="list3"><a>國(guó)內(nèi)</a><span>×</span></li>*@      </ul>      <div class="r1"><h1>型號(hào):</h1><div class="text1"><input id="typeofproduct" type="text" value="輸入型號(hào)" /></div></div>      <div class="r2"><h1>品牌:</h1><div class="text2" id="r2_text2"><h2 class="cur1">全部</h2><h2>FTDI</h2><h2>WIINET</h2><h2>3M-STATIC CONTROL SOLUTIONS</h2><h2>AAVID THERMALLOY</h2><h2>ALLIANCE</h2><a href="javascript:void(0);" id="more_r2" onclick="More_r2()">更多+</a></div><div class="text2" id="r2_text2_2" style="display:none"></div></div>      <div class="r3"><h1>庫(kù)存數(shù)量:</h1><div class="text1"><input type="text" class="ChangeInventoryquantity" id="startnumber" value="1000" /></div><a>-</a><div class="text2"><input class="ChangeInventoryquantity" id="endnumber" type="text" value="1000000" /></div><a>件</a></div>      <div class="r4"><h1>交貨地:</h1><div class="text2"><h2 class="cur1">全部</h2><h2 onclick="Trademark(this)">國(guó)內(nèi)</h2><h2 onclick="Trademark(this)">香港</h2></div></div>    </div>  </div>  <table class="bottom_right">    <tr class="tr1">      <td class="td1"><p>型號(hào)</p></td>      <td class="td2"><p>品牌</p></td>      <td class="td3"><p>庫(kù)存數(shù)量</p></td>      <td class="td4"><p>貨期</p></td>      <td class="td5"><p>起訂量</p></td>      <td class="td6"><p>交貨地</p></td>      <td class="td7"><p>香港交貨</p></td>      <td class="td8"><p>國(guó)內(nèi)交貨</p></td>      <td class="td9"><p>操作</p></td>    </tr>    <tr class="tr2">      <td></td>      <td></td>      <td></td>      <td><p>(工作日)</p></td>      <td></td>      <td></td>      <td></td>      <td><p>(含17%稅)</p></td>      <td></td>    </tr>    <tbody class="tr3"></tbody>  </table>

以上所述就是本文的全部?jī)?nèi)容了,希望大家能夠喜歡。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 沁阳市| 阳春市| 吉林省| 周宁县| 东乌珠穆沁旗| 新干县| 时尚| 普宁市| 舟曲县| 襄樊市| 泽州县| 阜阳市| 盐城市| 东至县| 湛江市| 德化县| 辉南县| 轮台县| 南岸区| 泸溪县| 奉节县| 屏山县| 怀集县| 呼伦贝尔市| 长武县| 辉县市| 达尔| 灵丘县| 新郑市| 海晏县| 洛南县| 手游| 河北省| 大兴区| 和平区| 余庆县| 伊吾县| 南京市| 凭祥市| 称多县| 鹰潭市|