...">
📜 ⬆️ ⬇️

Why is the comment code so redundant?

If you open the page code from Habra with the comments, then each comment looks like this:
<div class = "reply_word_holder" id = "reply_link208967"> (<a href=" javascript:saw(208967);"> reply </a> </ div>
<div style = "display: none" id = "reply208967">
<form action = "http://www.habrahabr.ru/blog/i_am_clever/16741.html?replyingto=208967#comment208967" method = "POST" id = "form208967" onsubmit = "return SubmitComment (208967, this); ">
<textarea class = "input_comments_reply" name = "comment" id = "reply208967ta"> </ textarea>
<input id = "cpb208967" type = "button" onClick = "PreviewComment (208967);" value = "preview">
<input id = "csb208967" type = "submit" name = "send" value = "add">
<div id = "preview208967" class = "comment_preview"> </ div>
</ form>
</ div>
</ div>
I am not good at programming, but can this be done with DOM and javascript?
Just why load extra code? But a lot of code ...

')

Source: https://habr.com/ru/post/10633/


All Articles