Echo jquery in php
how come this doesnt echo out on my page? supposed to be an ajax call:
Trying to write a form tag to the #quantity div.
echo '<script type="text/javascript">' . "\n";
echo '$("#quantity").append(function(index, html) { '. "\n";
echo 'return' . "\n";
echo '<form name="f1" id="f1"><input name="f1" id="f_1" type="hidden" value="1235" /></for开发者_运维问答m>' . "\n";
echo ' });' . "\n";
echo '</script>' . "\n";
<script>
var elem = '<form name="f1" id="f1"><input name="f1" id="f_1" type="hidden" value="'<?php echo $items["rowid"]; ?>'" /></form>';
$('#quantity').append(elem);
</script>
You were missing the single quotes around your PHP.
精彩评论