if user can't go to a website, then
{
a = ping 8.8.8.8
}
if a=="True" then
{
}
{
a = ping 8.8.8.8
}
if a=="True" then
{
}
<input type="text" id="mytext" />var myvariabel = document.getElementbyId("mytext")myobject.value = "Peace upon the earth";myobject.style.color = "Blue";
<input type="text" id="mytext" />
<script>
var myobject = document.getElementById("mytext")
myobject.value = "Peace upon the earth";
myobject.style.color = "Blue"
</script>
| Hasil Output |
<body>
var x=["senin", "selasa", "rabu", "kamis", "jumat", "sabtu", "minggu"];
<script>
var i=0;
var x=["senin", "selasa", "rabu", "kamis", "jumat", "sabtu", "minggu"];
while (x[i] != undefined)
{
alert(x[i]);
i = i + 1;
}
alert(i);
</script>
</body> <body>
Enter your username: <input type="text" id="myusername" />
Enter your password: <input type="password" id="mypassword" />
<input type="button" value="submit" onclick="check()"/>
<script>
function check(){
theusername = document.getElementById("myusername").value
thepassword = document.getElementById("mypassword").value
if (theusername == "Anggota")
{
if (thepassword == "PasswordAnggota")
{
alert("Your account is verified");
document.write("<!DOCTYPE html><head><title>Welcome to mysite</title></head><body><div id='mypictures' style='background-image: '>Hello World!</body>")
}
alert("Your password is wrong!");
}
}
</script>
</body><head> tags, add in an opening <title> tag and closing </title> tag and Between the <title> tags, write in a title for your page. For example, "My Webpage."</head> tag, put an opening <body> tag and a closing </body> tag, like in the example above.<p> tag and ends with a closing </p> tag. We can write content in between the tags.<h1> tag. Close the element with a closing tag </h1>. (Your content should now be between <h1> and </h1>.)<p> tags with whatever content you like.
document.getElementById("links").innerHTML = "<ul id='menu'>" +
"<li><a href='http://www.google.com'>News</a></li>"+
"<li><a href='http://www.yahoo.com'>Sports</a></li>"+
"</ul>";
static. This just means "where the element would normally go." If you don't tell an element how to position itself, it just plunks itself down in the document.position: absolute, it's then positioned in relation to the first parent element it has that doesn't have position: static. If there's no such element, the element with position: absolute gets positioned relative to <html>.#outer div to have absolute positioning. This means that when you position the #inner div, it will be relative to #outer. (If #outer had the default positioning of static, then #inner would get positioned relative to the entire HTML document.)static positioning.