helloworld的一万种写法
时间: 2023-09-15 11:21:18 浏览: 91
“Hello world!”的N种写法
1. print("Hello, World!")
2. cout << "Hello, World!" << endl;
3. System.out.println("Hello, World!");
4. echo "Hello, World!";
5. Console.WriteLine("Hello, World!");
6. alert("Hello, World!");
7. document.write("Hello, World!");
8. printf("Hello, World!");
9. puts("Hello, World!");
10. MsgBox "Hello, World!"
11. print_r("Hello, World!");
12. write("Hello, World!");
13. MsgBox("Hello, World!");
14. writeln("Hello, World!");
15. Response.Write("Hello, World!");
16. document.getElementById("output").innerHTML = "Hello, World!";
17. window.alert("Hello, World!");
18. document.writeln("Hello, World!");
19. document.write("<h1>Hello, World!</h1>");
20. document.body.innerHTML = "Hello, World!";
21. console.log("Hello, World!");
22. Response.Output.Write("Hello, World!");
23. document.getElementById("output").innerText = "Hello, World!";
24. System.out.print("Hello, World!");
25. System.out.printf("Hello, World!");
26. document.getElementById("output").textContent = "Hello, World!";
27. System.Console.WriteLine("Hello, World!");
28. document.createTextnode("Hello, World!");
29. print(f"Hello, World!")
30. print("H", "e", "l", "l", "o", ", ", "W", "o", "r", "l", "d", "!", sep="")
31. document.querySelector("#output").innerHTML = "Hello, World!";
32. document.getElementById("output").insertAdjacentHTML("beforeend", "Hello, World!");
33. document.write("<script>alert('Hello, World!')</script>");
34. window.prompt("Hello, World!");
35. document.getElementById("output").insertAdjacentText("beforeend", "Hello, World!");
36. document.getElementById("output").insertAdjacentHTML("beforeend", "<p>Hello, World!</p>");
37. document.write("<marquee>Hello, World!</marquee>");
38. document.getElementById("output").outerHTML = "<h1>Hello, World!</h1>";
39. document.getElementById("output").outerText = "Hello, World!";
40. document.write("<audio autoplay><source src='https://example.com/helloworld.mp3' type='audio/mpeg'></audio>");
41. document.write("<video autoplay><source src='https://example.com/helloworld.mp4' type='video/mp4'></video>");
42. document.write("<img src='https://example.com/helloworld.png'>");
43. document.write("<a href='https://example.com'>Hello, World!</a>");
44. document.write("<input type='text' value='Hello, World!'>");
45. document.write("<button onclick='alert(\"Hello, World!\")'>Click me</button>");
46. document.write("<textarea>Hello, World!</textarea>");
47. document.write("<select><option>Hello, World!</option></select>");
48. document.write("<canvas id='myCanvas'></canvas>");
49. document.write("<iframe src='https://example.com'></iframe>");
50. document.write("<table><tr><td>Hello, World!</td></tr></table>");
阅读全文