acao Posted March 28, 2014 Report Share Posted March 28, 2014 (edited) boas necessito de ajuda em, colocar um texto dentro de um input tipo text e ao clicar o texto desaparecer. idêntico aqui ao sistema de pesquisa no pap. o texto é adicionado em algum atributo do input e ele faz tudo? ou é no value e depois usar javascript cumps acao Edited March 28, 2014 by acao Link to comment Share on other sites More sharing options...
Rechousa Posted March 29, 2014 Report Share Posted March 29, 2014 Olá, É uma nova funcionalidade do HTML5, chama-se "placeholder". Exemplo: <input type="text" name="search" placeholder="Pesquisar..." /> Mais informação aqui: http://www.w3schools.com/tags/att_input_placeholder.asp Espero ter ajudado, 1 Report Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa Link to comment Share on other sites More sharing options...
I-NOZex Posted March 29, 2014 Report Share Posted March 29, 2014 tens sempre a opção oldSchool crossbrowser ... js <input type="text" value="Search" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}"> +info http://webdesignerwall.com/tutorials/cross-browser-html5-placeholder-text 2 Report B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net Link to comment Share on other sites More sharing options...
acao Posted March 30, 2014 Author Report Share Posted March 30, 2014 obrigado cumps acao Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now