Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- .bordered{
- margin-top: 2px;
- border-bottom-style: solid;
- border-color: #e0e0d1;
- }
- .field{
- margin-top: 50px;
- font-kerning: normal;
- font-family: "Lucida Sans Unicode";
- }
- .title-chap{
- font-family: "Verdana";
- }
- .button {
- background-color: #e7e7e7;
- border-style: solid;
- border-color: black;
- border-radius: 10px;
- color: black;
- padding: 10px 15px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 15px;
- margin: 4px 2px;
- cursor: pointer;
- }
- </style>
- <script scr="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <title>Ler nje koment</title>
- </head>
- <body>
- <div class="bordered" id="title-head">
- <h2 class="title-chap">Shkruaj nje koment</h2>
- </div>
- <div id="comment-form">
- <label class="field">Emri:</label><br />
- <input type="text" id="emri" /> <br />
- <label class="field">Email:</label><br />
- <input type="text" id="email" /><br />
- <label class="field">Komenti:</label><br />
- <input type="textarea" id="koment" /><br />
- <input type="button" value="Dergo" class="button" id="drg_btn"/><br />
- <br />
- <label id="result"></label>
- <script>
- $(document).ready(function(){
- $("#drg_btn").click(komento());
- });
- function komento()
- {
- var res = "Komenti u postua!";
- if($("#emri").val().length == 0){
- res = "Shkruaj emrin sakte.";
- }
- if(!$("#email").val().includes("@")){
- res = "Shkruaj email-in ne formatin e duhur!";
- }
- if($("#koment").val().length == 0)
- {
- res = "Duhet te bashkengjitesh nje koment!";
- }
- $("#result").html(res);
- }
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement