Untitled
unknown
plain_text
a year ago
1.1 kB
10
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shfaq emrin n here </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 e emrit n here </h1>
<button onclick="shfaq_emrin(1, 100)">Shfaq numrat tek nga 1 ne 100</button>
<div id="output"></div>
<script>
var emri=window.alert("Jepni emrin tuaj");
var heret=window.alert("Jepni sa here do perseritet ");
function shfaq_emrin(emri, heret) {
let outputDiv = document.getElementById('output');
outputDiv.innerHTML = ''; // Clear previous output
for (let i = 1; i <=heret ; i++) {
let line = document.createElement('div');
line.textContent = emri;
outputDiv.appendChild(line);
}
}
</script>
</body>
</html>Editor is loading...
Leave a Comment