Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.5 kB
2
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()">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");
var vendlindja = window.prompt("jepni vendlindjen tuaj");

function shfaq_emrin() {
    let outputDiv = document.getElementById('output');
    outputDiv.innerHTML = ''; // Clear previous output

    let line1 = document.createElement('div');
    line1.textContent = "Emri: " + emri;
    outputDiv.appendChild(line1);

    let line2 = document.createElement('div');
    line2.textContent = "Mbiemri: " + mbiemri;
    outputDiv.appendChild(line2);

    let line3 = document.createElement('div');
    line3.textContent = "Mosha: " + mosha;
    outputDiv.appendChild(line3);

    let line4 = document.createElement('div');
    line4.textContent = "Vendlindja: " + vendlindja;
    outputDiv.appendChild(line4);
}
</script>

</body>
</html>
Leave a Comment