有勇气的牛排博客

html 遇到多个class时取当前行参数

有勇气的牛排 334 前端 2023-05-18 22:29:08

<button value='' onclick='goToLine(this.value);'>录入信息</button>
<script type="text/javascript"> var _LoadingHtml = '<div id="loadingDiv" style="position:fixed;left: 0;top: 0;right: 0;bottom: 0;z-index: 99999;"><div style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);"><img src="./load.gif" style="vertical-align: middle;width: 100px;"></div></div>'; function goToLine(obj) { alert(obj) // // alert(obj.innerHTML); // alert(obj); // $.ajax({ // url: '/booksFilelist', // type: 'POST', // dataType: 'json', // data: { // 'name': obj // }, // success: function (res) { // // $("#loading").empty(); // // if (res.data == 200) { // alert("导入成功") // } else if (res.data == 0) { // $("body").html("文档格式错误,请检查!!!<br><a href=\"/booksFilelist\">返回</a>"); // } // }, // error: function () { // alert('报错') // } // }); } </script>

留言

专栏
文章
加入群聊