Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified database.sqlite
Binary file not shown.
20 changes: 17 additions & 3 deletions templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
}

</script>

{% endblock %}


Expand Down Expand Up @@ -150,16 +151,14 @@ <h2 class="card-title">{{ article.title }}</h2><!--title-->
</div>


</div>
</div>


<br>
<!--comment edit-->
<div class="card">
<div class="card-body">
<form method="post" action="{{ url_for('post_comment', articleID=article.id) }}" onsubmit="">


<div class="form-group">
<input type="email" class="form-control" id="email" name="email" placeholder="Enter your email"
required="required">
Expand All @@ -172,6 +171,21 @@ <h2 class="card-title">{{ article.title }}</h2><!--title-->

<button class="btn btn-primary" type="submit" style="float:right">comment</button>
</form>

<script type="text/javascript">
// 第一种 通过点击事件
var clicktag = 1;
btn.onclick = function () {
if (clicktag == 3) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1500h

Why do you choose 3, instead of 4 or 5?

-Hui

alert("请勿频繁点击!");
setTimeout(function () { clicktag = 0 }, 60000);
} else {
clicktag = clicktag + 1;
}
}

</script>

</div>
</div><br>

Expand Down