Log in

View Full Version : Blinking Cursor In HTML



soopaflyguy
12-27-2009, 11:48 AM
Hi All,

Does anyone out there know how to create a flashing/blinking cursor in HTML/Java etc for my website.

Basically, I want to create a login script (somehow!) where the 1st page of my website is a black screen with the words LOGIN> and PASSWORD> with the flashing cursor after the arrow?

Would be very grateful if someone could help!

Thanks.

Soopaflyguy

jscheuer1
12-27-2009, 12:23 PM
Just getting that effect is relatively easy, particularly depending upon what exactly you mean by flashing. An ordinary HTML form has a flashing cursor of sorts in it's text fields:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
label {
font-family: sans-serif;
font-weight: bold;
}
</style>
<script type="text/javascript">
onload = function(){document.forms[0][0].focus();};
</script>
</head>
<body>
<form action="page1.htm">
<div>
<label>Login > <input type="text" name="name"></label><br>
<label>Password > <input type="password" name="password"></label><br>
<input type="submit" value="Go!">
</div>
</form>
</body>
</html>

But then the real question arises:

How secure and flexible do you want this to be?