我正在开发一个需要chrome
对象的用户脚本,但我无法访问它。如何访问chrome
tampermonkey 用户脚本内的对象?也许,清单中的一些权限或者什么......
我有一个输入类型按钮(由于它触发了表单内的辅助动作,因此无法提交类型),如果在上一个下拉选择器上未进行选择,则需要保持禁用状态。我尝试失败了:this,this,this和其他一些...
这是我的表单代码:
echo "<select class='corpusname' id='corpusname' size='1' name='corpusname' required />
<option value=''>Select a corpus</option>";
// This query gives the other options from a database
$result = mysqli_query($db, "SELECT * FROM corpus_info") or die(mysqli_error($db));
while($cpsmlg = mysqli_fetch_array($result)){
echo "<option value='".$cpsmlg['corpus']."'>".$cpsmlg['title']."</option>";
}
echo "</select>
<a id='theLink' target='_blank'>
// This is the button to be disabled
<input type='button' id='seedoc' class='seedoc' value='See doc' /></a>";
Run Code Online (Sandbox Code Playgroud)