Javascript常用代码汇总
//js中获取image的src值的语句: var path = $('#suolue').attr('src'); var path = document.getElementById("suolue").src; var path = $("#suolue")[0].src; //js获取a标签的文本内容 <a id="oldreportpath" class="info" style="margin: 0px 0px 5px 0px;float:left;width:auto;">..\..\QMSUploads\RMA\\test2\20191129095325_3218.pptx</a> js :document.getElementById(“idname”).innerText; jq:$("#idname").text();