Discussions Q&R
what's wrong in this condition
prompt ("")
if (prompt ("1")) {
document.write("<h1>HTML Tutorial</h1>");
} else if (prompt ("2")) {
document.write("<h1>CSS Tutorial</h1>");
} else {
document.write("<h1>JavaScript Tutorial</h1>");
}
I want when type 1 in output HTML tutorial shows, type 2 css tutorial shows else javascript tutorial
0 Vote
13 RéponsesWhat is wrong with this code?
-
-
<!Doctype html>
<head>
</head>
<body>
<form>
<input type="text" id="input">
</form>
<button type="button" id="button">Click here</button>
<script>
var input=document.getElementById("input");
var button=document.getElementById("button");
function display() {
if (button.clicked == true) {
console.log("input");
}
};
display();
</script>
</body>
0 Vote
7 Réponsesi want to print sum of all integers from 1to 100 like for example :
1
3
6
10
15......
i tried it i know my code is wrong please help me class Program {
public static void main(String[] args) {
for(int x = 1; x <101; x++) {
int sum = int x;
System.out.println("1");
System.out.println("sum");
}
}
}
3 Votes
11 RéponsesAujourd'hui en vedette
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes