jQuery web 组件 后台日历价格、库存设置的代码(2)

<!doctype html> <html> <head> <meta charset="utf-8"> <title>YageizaDate Demo</title> <script src="https://www.jb51.net/jquery-1.12.1.min.js"></script> <link href="https://www.jb51.net/date-selector/style.css" type="text/css"> <script src="https://www.jb51.net/date-selector/yagiza-date-selector.min.js"></script> <!--[if lte IE 9]> <link href="https://www.jb51.net/date-selector/style-ie.css" type="text/css"> <![endif]--> <style> .container { width: 800px; margin: 20px auto; } </style> </head> <body> <div> <table> <tr> <td> <b>结算价</b> <input data-id="priceSettlement" type="text" size="10"> <b> 售价</b> <input data-id="priceNormal" type="text" size="10"> <b> 返点</b> <input data-id="cashback" type="text" size="10"> <b> 总库存</b> <input data-id="stock" type="text" size="10"> <button type="button">设置日期价格</button> </td> </tr> </table> <textarea>接收回调数据</textarea> </div> <script> $(function(){ $('button').on('click', function(){ var priceData = { callbackId:'#mydemo', priceSettlement: $(this).siblings('[data-id="priceSettlement"]').val(), priceNormal: $(this).siblings('[data-id="priceNormal"]').val(), cashback: $(this).siblings('[data-id="cashback"]').val(), stock: $(this).siblings('[data-id="stock"]').val(), dayData: [ // { // date: "2016-10-21", // stockDay: "9000", // buyNumMax: "50", // buyNumMin: "1", // priceNormal: "0.12", // priceMarket: "100.00", // priceSettlement: "90.00", // priceRetail: "99.00" // },{ // date: "2016-11-12", // stockDay: "9000", // buyNumMax: "50", // buyNumMin: "1", // priceNormal: "12.00", // priceMarket: "100.00", // priceSettlement: "90.00", // priceRetail: "99.00" // } ] } $.yagizaDate('2016-10-08',priceData); }); }); </script> </body> </html>

style.css

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wzdsgd.html