function onclickWrite(type, keyword, html) { let title_field = document.getElementById('title_field') var hasValues = true if (hasValues) { let data = { 'title': title_field.value, 'content': encodeURIComponent(html), } let uploadUrl = location.protocol + "//" + location.hostname + "/blog/post.ajax"; if(confirm(JSON.stringify(data) + "\n해당 내용으로\n유저 등록 하실??")) { post(uploadUrl,type,JSON.stringify(data),keyword, function (resultData) { alert(resultData) }) } else { } } }