This article will share with you the usage of javascript and ajax to implement code for refreshing new information on product pages. It is very simple and practical. If you need it, you can refer to it. Js
// Load the page // load the product list 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 = ""; // exchange rate judgment //"+ (Result. SupplierProductList [I]. ProductList [j]. PriceUSD. toString () = '0 '? 1: result. supplierProductList [I]. productList [j]. USDPriceList [0]. minQuantity) + ":" + result. supplierProductList [I]. productList [j]. priceUSD +"// Display Search-product information list 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 + =""+ Result. SupplierProductList [I]. ProductList [j]. Model +""+ Result. SupplierProductList [I]. ProductList [j]. Manufacturer +""+ (Result. SupplierProductList [I]. ProductList [j]. Quantity) +""+ Result. SupplierProductList [I]. ProductList [j]. ShipDays +""+ Result. SupplierProductList [I]. ProductList [j]. MinOrderQuantity +" +"+ Result. SupplierProductList [I]. ProductList [I]. DeliveryPoint +""+ Result. SupplierProductList [I]. ProductList [j]. PriceUSD +""+ Result. SupplierProductList [I]. ProductList [j]. PriceCNY +"Add to shopping cart
";}}// Display Search -- brand list var html2 =" all "; if (result. manufacturerList. length> 0) {for (var I = 0; I <result. manufacturerList. length; I ++) {if (result. manufacturerList [I]. keyName! = Null) {if (I <5) {html2 + = "" + result. manufacturerList [I]. keyName + "" ;}}// reclaim html2 + = "More +" ;}// do not delete the first content, append the product information table $ ("# r2_text2 "). not ($ (". cur1 ")). empty (); $ ("# r2_text2 "). append (html2); // rewrite the brand line $ (". tr3 "). empty (); $ (". tr3 "). append (html) ;}};$. ajaxRequest (PostExecParam );};
. Cshtml
Filter
- Integrated circuit>
@*
- INFINEON ×
- 100-1000 x
- Domestic ×
*@
Model:
Brand:
All FTDIWIINET3M-STATIC control solutionsaavid thermalloyalliance more +
Inventory quantity:
-
Parts
Place of delivery:
All domestic and Hong Kong
Model |
Brand |
Inventory quantity |
Bytes |
Order Quantity |
Place of delivery |
Hong Kong delivery |
Domestic delivery |
Operation |
|
|
|
(WorkDay) |
|
|
|
(Including 17% tax) |
|
The above is all the content of this article. I hope you will like it.