I want to get a Post id from a javascript function in the post editor. I tried this code, but does not work for me:
<script>
function get_post_content(){
return document.getElementById("post-"+id).innerHTML;
}
</script>
<a href="#" onclick="get_post_content(<?php the_ID(); ?>);">Next</a>
Thank you in advance.