I need to do this without开发者_Python百科 any hack. Thanks.
You won't be able to do this without some sort of hackery.
Here's a simple pure CSS hack:
input {
background-image: url(cursor-anim.gif);
background-position: 4px 50%;
}
input:focus {
background-image: none;
}
But, as others have said, It might be worth asking yourself if this may lead to your users getting confused...
Wrap a pipe (|) in a blink tag (ugh) and position it absolutely over a text input!
Seriously though, don't confuse gentle users :)
精彩评论