how to change the text in js code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: change the text of inputfield unity
using UnityEngine.UI;
public InputField example;
public string textToPutToInputField = "If I helped you don't forget to upvote!";
public void SetTheText()
{
example.text = textToPutToInputField;
}
Example 3: change the border of an image js
<input id="imageId" type="image" src="http://goo.gl/UohAz" onclick="mark(this)"/>
function mark(el) {
el.style.border = "1px solid blue";
}