我是Chrome扩展程序的新手。当我将该元素的“ xpath”或“ CSS”传递给扩展名并按提交时,我想创建一个针对浏览器上Web元素的扩展名。
此扩展的范围仅用于检查xpath或CSS是否仅属于该元素。
我到目前为止尝试过的代码:
setTimeout(function() {
$('#moped-text').focus();
}, 500);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<html>
<head>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="popup.js"></script>
</head>
<body>
<div class="container">
<textarea name="newText"></textarea>
</div>
</body>
</html>