-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_javascript.html
More file actions
36 lines (28 loc) · 1.3 KB
/
test_javascript.html
File metadata and controls
36 lines (28 loc) · 1.3 KB
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
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Test - Direct HTML</title>
</head>
<body>
<h1>JavaScript Test Page (Direct HTML)</h1>
<p>If JavaScript works, you should see an alert and green text.</p>
<div id="test-div">Testing...</div>
<script>
// Multiple ways to test JavaScript
alert('🚨 JavaScript is working! This is a direct HTML test.');
console.log('🚨 JavaScript console log working!');
// DOM manipulation test
document.getElementById('test-div').innerHTML = '<span style="color: green; font-weight: bold;">✅ JavaScript DOM manipulation works!</span>';
// Add more content
document.body.innerHTML += '<p style="color: blue; font-size: 18px;">✅ JavaScript document.write equivalent works!</p>';
// Function test
function testFunction() {
alert('🚨 JavaScript function execution works!');
}
// Auto-run function after 1 second
setTimeout(testFunction, 1000);
// Add a button dynamically
document.body.innerHTML += '<button onclick="alert(\'Button click JavaScript works!\');" style="padding: 10px; font-size: 16px; margin-top: 20px;">Click me to test JavaScript events</button>';
</script>
</body>
</html>