<div>
<% if(question) { %>
<h2><%= author %>: <%= question %></h2>
<div><textarea name="answer" id="answer"></textarea></div>
<ul class="nNav btnList">
<li>
<a href="" onclick="ACT.question.answer('index'); return false;"></a>
</li>
</ul>
<% } else { %>
<h2> , !</h2>
<% } %>
</div>
* This source code was highlighted with Source Code Highlighter.
{"id":"98","question":"What are you doing now?","author":"Mihalich88"}
* This source code was highlighted with Source Code Highlighter.
$.ajax({
type: "POST",
url: "/data/question.php",
dataType: "json",
data: data,
success: function(ans){
var html = new EJS({url: ' /templates/question.ejs'}).render(ans);
}
});
* This source code was highlighted with Source Code Highlighter.
Source: https://habr.com/ru/post/104628/
All Articles