Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

How to change the content of a text input?

$
0
0

Hi!

I would like to help me with the following

 

I've create and input text, for example this:

 

var one= sym.$("one")

one.html("Enter your answer: ");

inputOne = $('<input />').attr({'type':'text', 'value':'', 'id':'one'});

inputOne .css ('font-size', 14);

inputOne .css ('width', 350);

inputOne .css ('background-color', '#0a81fb');

inputOne .appendTo(one);

 

Now the user can write anything in this input text.

 

The corret word that the user has to write is "correct"

so i use an if to validate it

 

if (inputOne.val() == "correct"){

     alert ("good")

}else {

       // HERE IS MY PROBLEM!!!   What i need to do is: if the user types a wrong answer i           //need to show him the correct answer in the input text.

}

 

 

I hope you can help me.

 

 

Thank's =)


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>