Answer the question
In order to leave comments, you need to log in
How to display an object in a DIV?
As soon as the data in input changes, displaying it in alert works:
<input id="foo"... >
<script type="text/javascript">
$('#foo').change(function(){
var ff = $('#foo').val();
alert('Элемент foo был изменен' + ff);
});
</script>
<input id="foo"... >
<script type="text/javascript">
$('#foo').change(function(){
var ff = $('#foo').val();
$('#forecast').load(ff);
});
</script>
<div id="forecast"></div>
Answer the question
In order to leave comments, you need to log in
<input id="foo"... >
<script type="text/javascript">
$('#foo').change(function() {
var foo = $(this).val();
$('#forecast').text(foo);
});
</script>
<div id="forecast"></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question