1
Colleagues, I have the following scenario:
I have an input
input type="text" id="myField3" name="myField3" ng-model="selected"/>
I need to play the content of this input in a variable in javascript:
<script>
var escopo = document.getElementById('myField3').value;
console.log(escopo);
</script>
Does not return anything in the variable log. The input content is correct.
Looks like a typo (or input is generated at another time in the program stream). No
)
at the end ofdocument.getElementById('myField3').value;
– BrTkCa
Do you want to take this value from outside of Angularjs, is that it? Because from within it will be updated in real time in the model
selected
.– bfavaretto
Exactly I need to pick it out and store it in a variable. The input is coming from the angular and is ok. now I need the content of this input to play for a variable in javascript
– user10111111
Attaches the code with the folders in Google driver and provides the link here.
– thiago
@It would be better to put a minimum, complete and verifiable example right here.
– bfavaretto