var html =
'<div class="entry">' +
'<h1>{{title}}</h1>' +
'<div class="body">' +
'{{body}}' +
'</div>' +
'</div>';
var title = "Vasya";
var body = "Pupkin";
var result = html.replace("{{title}}", title);
result = result.replace("{{body}}", body);
console.log(result);
$("#myForm").on("submit", function (e) {
e.preventDefault();
var $this = $(this);
var data = $this.serialize();
$.ajax({
... send data
success: function () {
$this.find('textarea').prop('value', '');
}
})
});
<!-- polosochka -->
<div>
<strike>Зачеркнутый текст</strike> и еще один <del>Зачеркнутый текст</del>
</div>
<div>
<strike class="special">Зачеркнутый текст</strike>
</div>
<div>
<strike class="firefox">Зачеркнутый текст</strike>
</div>
.special {
position: relative;
display: inline-block;
text-decoration: none;
}
.special:after {
position: absolute;
display: block;
content: "";
top: 50%; left: 0;
width: 100%; height: 2px;
margin-top: -1px;
background: #f00;
}
.firefox {
text-decoration-color: #f00;
}