UIpath在浏览器中怎么插入jquery脚本?有没有谁用过的?
Hi @caigy
使用Inject Js Script活动可以嵌入js文件到页面上,在js文件中运行jquery脚本。
我的JS文件是这样写的,为什么不行呢?
function (element, input) {
var a=jqery();
alert(a);
}
function jqery(){
$(“#DlRank”).value;
}
报错是:插入 Js 脚本 ‘DIV dbj’: ReferenceError: $ is not defined
$方法名未定义,需要先导入jquery库到页面。
html中:
<script src=“jquery-1.10.2.min.js”>
js中:
document.write(“<script src=‘jquery-1.10.2.min.js’>”);
楼上正解
把$改成jquery试试