javascript - Print a variable in Html -



javascript - Print a variable in Html -

iam beginner jquery , javascript..please help me out.. want value of "x" variable stored in html div's...

<script> var x=''; $('#calendar').datepicker({ //altfield: '#datepicker_send', inline: true, firstday: 1, showothermonths: true, daynamesmin: ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'], onselect: function(datetext) { x = datetext; //alert(x); } }); <div class="evnt-p">no events on : <script>document.write (x); </script> </div>

what need update date when datepicker value changed so

<div class="evnt-p">no events on : <span id="event-date"></span></div>

then

$('#calendar').datepicker({ //altfield: '#datepicker_send', inline: true, firstday: 1, showothermonths: true, daynamesmin: ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'], onselect: function (datetext) { $('#event-date').text(datetext) } });

javascript jquery datepicker

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -