Print Javascript function in htm php page -
this javascript code:
<script> $(function() { $('#input').validatecreditcard(function(result) { $('.log').html('card type: ' + (result.card_type == null ? '-' : result.card_type.name) + '<br>valid: ' + result.valid + '<br>length valid: ' + result.length_valid + '<br>luhn valid: ' + result.luhn_valid); }); }); </script>
i m print result value in html tag like:
<h1><script>document.write(result.card_type.name())</script></h1> <h1><script>document.write(result.valid())</script></h1> <h1><script>document.write(result.length_valid())</script></h1> <h1><script>document.write(result.luhn_valid())</script></h1>
bt not showing value..!!
the "result" variable local function. cant use in document that.
delete 4 lines in html , add instead:
<h1 class="log"></h1>
do desired result? if not you'll need better explain "validatecreditcard" is.
Comments
Post a Comment