From 124102d5db2a2ace2f2d8484ceda658829657552 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 06 一月 2024 14:14:52 +0800 Subject: [PATCH] 图片表的sql操作 --- JiangSu/index.html | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/JiangSu/index.html b/JiangSu/index.html index f353162..0b7ab2a 100644 --- a/JiangSu/index.html +++ b/JiangSu/index.html @@ -69,6 +69,35 @@ return JSON.stringify(model); } + function InsertImg() { + var data = getImg(); + + ajax("Img/Insert", "POST", data, null, null, function (rs) { + console.log(rs); + alert(rs); + }); + } + + function UpdateImgById() { + var data = getImg(); + + ajax("Img/UpdateById", "POST", data, null, null, function (rs) { + console.log(rs); + alert(rs); + }); + } + + function getImg() { + var model = { + id: $("#iid").val(), + name: $("#iname").val(), + path: $("#ipath").val(), + json: $("#ijson").val() + }; + + return JSON.stringify(model); + } + function ajax(url, type, data, dataType, contentType, fn) { $.ajax({ url: url, @@ -111,6 +140,18 @@ json: <textarea id="gjson" style="width: 1024px;height: 70px;">{ "type": "Feature", "properties": { "ID": "12", "NAME": "Area8", "REMARK": "" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 120.24179180542139, 32.005615085853492, 13.770 ], [ 120.24175240823769, 32.005610442630996, 13.770 ], [ 120.24173428512847, 32.005722106674966, 13.770 ], [ 120.24177368235908, 32.005726749902777, 13.770 ], [ 120.24179180542139, 32.005615085853492, 13.770 ] ] ] } }</textarea> <br /> <input type="button" value="InsertGrid" onclick="InsertGrid();" /> <input type="button" value="UpdateGridById" onclick="UpdateGridById();" /><br /> <br /> + + + 鍥剧墖锛�<a href="http://localhost/JiangSu/Img/SelectByPage?pageSize=10&pageIndex=1&name=">SelectByPage?pageSize=10&pageIndex=1&name=</a> <span style="width: 50px;"> </span> + <a href="http://localhost/JiangSu/Img/SelectById?id=1">SelectById?id=1</a> <span style="width: 50px;"> </span> + <a href="http://localhost/JiangSu/Img/DeleteByIds?ids=3&ids=0">DeleteByIds?ids=3&ids=0</a> <br /> + + id: <input id="iid" value="1" /> <br /> + name: <input id="iname" value="1.jpg"/> <br /> + path: <input id="ipath" value="Images\1.jpg"/> <br /> + json: <input id="ijson" value="{}"/> <br /> + <input type="button" value="InsertImg" onclick="InsertImg();" /> + <input type="button" value="UpdateImgById" onclick="UpdateImgById();" /><br /> <br /> </form> </body> </html> -- Gitblit v1.9.3