Kapets confused with them

<div class="delete_post" onclick="this.parentNode.parentNode.innerHTML = '<div id="post_del49294537_597" class="dld" style="display: block">+"Сообщение удалено."+ <a> +"Восстановить"+ </a><a> +"Это спам"+ </a></div>' "></div> 

In general, you need to insert

  <div id="post_del49294537_597" class="dld" style="display: block"> Сообщение удалено. <a>Восстановить</a> <a>Это спам</a> </div> 
  • one
    nothing is clear in this mess of spaces and letters) - thunder
  • @thunder partly responds with 50% rolls: D - lampa
  • what a marvel crap) - Palmervan
  • Is this you for hashcode? :) - VladD

3 answers 3

 innerHTML = '<div id="post_del49294537_597" class="dld" style="display: block">\ Сообщение удалено.\ <a>Восстановить</a>\ <a>Это спам</a>\ </div>'; 

Correction:

 <script> function removeMess(th) { th.parentNode.parentNode.innerHTML = '<div id="'+th.getAttribute('data')+'" class="dld" style="display: block">\ Сообщение удалено.\ <a>Восстановить</a>\ <a>Это спам</a>\ </div>'; } </script> <div data='post_del49294537_597' class="delete_post" onclick="removeMess(this)"></div> 
  • do not forget that it is done through onlick :) which of course is not ice, but apparently it should be so - thunder
  • @thunder did not understand, what are you talking about? i see - lampa
  • This was the problem that it was necessary to do through a function in a script, and not like me - Zow
  • O_o unexpected! and where is it written in the question ??? - thunder
  • I meant that if I immediately tried the function through the function, and not in <body>, then this would not have happened - Zow
 <div class="delete_post" onclick="this.parentNode.parentNode.innerHTML = '<div id=\"post_del49294537_597\" class=\"dld\" style=\"display: block\">+\"Сообщение удалено.\"+ <a> +\"Восстановить\"+ </a><a> +\"Это спам\"+ </a></div>' "></div> 

    Well, shield them, what's the problem?

     <div class="delete_post" onclick="this.parentNode.parentNode.innerHTML = '<div id=\"post_del49294537_597\" class=\"dld\" style=\"display: block\">Сообщение удалено.<br/><a>Восстановить</a><br/><a>Это спам</a></div>' "></div> 

    although it is not clear that xa +"Сообщение удалено"+ =)

    • This is in VK so, I do not when I do not wrap the text in a divine, usually <p> - Zow