-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlorem-ipsum-generator.html
30 lines (26 loc) · 1.14 KB
/
lorem-ipsum-generator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lorem Ipsum Generator by Toolzr</title>
<meta name="description" content="Generate customizable dummy text with the Lorem Ipsum Generator. Perfect for seamless web design and content creation.">
</head>
<body>
<h1>Lorem Ipsum Generator</h1>
<label for="paragraphCount">Paragraphs:</label>
<input type="number" id="paragraphCount" value="1" min="1">
<button id="generate">Generate</button>
<div id="loremIpsumOutput">
<p>Your generated Lorem Ipsum text will appear here.</p>
</div>
<script>
document.getElementById('generate').addEventListener('click', function() {
const paragraphCount = document.getElementById('paragraphCount').value;
const loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit...";
// A simple example, use a more complex algorithm or an API for more variability
const loremIpsumText = Array(parseInt(paragraphCount, 10)).fill(loremIpsum).join('\n\n');
document.getElementById('loremIpsumOutput').innerHTML = `<p>${loremIpsumText.replace(/\n/g, '<br><br>')}</p>`;
});
</script>
</body>
</html>