There is a code to add text to the iframe. How to add a button to create new fields for text
$("#text1").click(function(e) {
var x = document.getElementById("fname").value;
document.getElementById("output").setAttribute("text", "value", x);
return false;
});
form {
position: absolute;
z-index: 1;
background: white;
padding: 1em;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script>
<form name="myForm" href="" onsubmit="text">
id: <input type="number" value="text" name="fname" id="fname"><br><br>
<input id="text1" type="submit" value="Отправить">
</form>
<a-scene background="color: black">
<a-entity id="output" text="value: output; align: center;" position="0 1.6 -0.5"></a-entity>
</a-scene>
Aucun commentaire:
Enregistrer un commentaire