请允许我说,我是用java文撰写的:
function form(csrf){
document.write( <form action="" method="post"> +csrf);
document.write(....);
document.write( <button>Go</button></form> );
}
In template:
<script type="text/javascript">
form({% csrf_token %});
</script>
这样做是否安全?
感谢!