![ישן](https://static.fresh.co.il/images/vBulletin/statusicon/post_old.gif)
03-09-2020, 00:07
|
![צלמית המשתמש של DeepSpace](image.php?u=21049&dateline=1518537285) |
|
|
חבר מתאריך: 23.09.03
הודעות: 12,139
|
|
אפשרי בקלות עם JS.
קוד:
<df-messenger
intent="WELCOME"
chat-title="Just a test"
agent-id="5af0a9b6-61c4-4e7a-a29d-ba17b3a97dc6"
language-code="en"
user-id = "mishu"
></df-messenger>
<input type="text" id="user-input">
<button id="button">update</button>
עם jquery
קוד:
$("#button").on("click", function(){
$("df-messenger").attr("user-id", $("#user-input").val());
})
בלי jquery
קוד:
document.getElementById("button").addEventListener("click", function() {
document.querySelector("df-messenger").setAttribute("user-id", document.getElementById("user-input").value);
});
_____________________________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
נערך לאחרונה ע"י DeepSpace בתאריך 03-09-2020 בשעה 00:13.
|