填充远程加载的javascript的文本框

我们使用Zoho SalesIQ进行实时聊天,我可以使用javascript将自定义字段添加到加载中,但是,我不能像往常一样:

 $("#device").val("test");

 document.getElementById("device").value = "test";

远程加载的聊天箱。我认为这是因为它是从外部加载的,可能无法访问。

计算出来的实时聊天的javascript如下所示

<div custom = "Device"
type = "url"
customid = "Device"
custombx = "true" > < input type = "text"
class = "siq-input-text-box"
docblur = "custominput"
purpose = "custom"
visibility = "both"
placeholder = "We'll populate this automatically if required"
id = "device"
mandatory = "false"
custom = "Device"
name = "Device"
data - validate = "optional url"
autocomplete = "off"
maxlength = "100"
minlength = "0"
info = "url"
style = "display: inline-block;" > < /div>

但是,当我从外部源加载实时聊天小部件时,似乎无法访问文本框来填充它。

有没有不同的方法来实现这一点?

转载请注明出处:http://www.fymidi.com/article/20230526/2467561.html