Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
1.7 kB
1
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Shfaq emrin</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        #output {
            white-space: pre-line; /* Ensures that new lines are respected */
        }
    </style>
</head>
<body>

<h1>Shfaqja te dhenat personale </h1>
<button onclick="shfaq_emrin(emri, mbiemri,mosha,vendlindja)">Shfq te dhenat personale </button>

<div id="output"></div>

<script>
var emri=window.prompt("jepni emrin tuaj");
var mbiemri =window.prompt("jepni mbiemrin tuaj");
var mosha=window.prompt("jepni moshen tuaj tuaj");
var vendlindja=window.prompt("jepni vendlindjen tuaj tuaj");


    function shfaq_emrin(emri,mbiemri,mosha,vendlindja) {
        let outputDiv = document.getElementById('output');
        outputDiv.innerHTML = ''; // Clear previous output

        for (let i = emri; i<=2; i++) {
             {
                let line = document.createElement('div');
                line.textContent =emri;
                outputDiv.appendChild(line);
                let line2 = document.createElement('div');
                line2.textContent =mbiemri;
                outputDiv.appendChild(line2)
                let line3 = document.createElement('div');
                line3.textContent =mosha;
                outputDiv.appendChild(line3);
                let line4 = document.createElement('div');
                line4.textContent =vendlindja;
                outputDiv.appendChild(line4)
               
            }
        }
    }
</script>

</body>
</html>
Leave a Comment