Untitled
unknown
plain_text
3 years ago
841 B
4
Indexable
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test</title> </head> <body> <form id="yorumForm"> Ad soyad: <input type="text" name="adsoyad" id="adsoyad" required=""> <br> Yorum: <textarea id="yorum" name="yorum" required=""></textarea> <br> <button type="submit" id="yorumGonder">Yorum Yap</button> </form> <hr> <h3>Yorumlar</h3> <div class="yorumlar"></div> <script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script type="text/javascript"> $(document).on('submit', '#yorumForm', function(){ var adsoyad = $("#adsoyad").val(); var yorum = $("#yorum").val(); $(".yorumlar").append('<div>Yazan: '+adsoyad+' <br> Yorum: '+yorum+' <br> <button onclick="$(this).parent().remove();">Yorumu sil</button> <hr> </div>'); $("#yorumForm").trigger('reset'); return false; }); </script> </body> </html>
Editor is loading...