문제

I have a very long php form which is used to save input values entered by users. I want to show hints next to the input boxes. I know this HTML input field hint but this is not my goal, i want to show it next to the input boxes which will appear/disappear when ever user selects the respective field. (i want this in html not in javascript etc because i do not know JavaScript.)

도움이 되었습니까?

해결책

You should use HTML5 and use textfields like

<input type="text" placeholder="enter input" title="Enter input here">

다른 팁

You can do it with the :focus CSS pseudo-class. Put a span next to the input box and give it this style:

.hint { display: none; }
input:focus + .hint { display: inline; }

JSBin: http://jsbin.com/inilot/1/edit

You can use title argument like this :

<input title="hint" ... />

This is a CSS technique without using any Java{script} code:

<style>
.ami div {display:none}
.ami:hover div {display:block}
</style>
<a class=ami href="#">Please hover me <div>I show only when you over</div></a>
</html>

Hope I Help

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top