I think I already have a question answered more or less with what I want, but I do not handle much of js and I was not able to filter the necessary information in the ones I read ... THEN!
I would like to know how I could do so that as soon as I selected <option value="Jurídica">
of my <select>
, <input id="name">
automatically changed its placeholder="* Nome Completo"
to placeholder="*Nome de sua Empresa"
and that <input name="cpf">
disabled
or readonly
.
<form>
<select name="pessoa" id="pessoa">
<option value="Não especificado">*Tipo de Pessoa</option>
<option value="Física">Física</option>
<option value="Jurídica">Jurídica</option>
</select>
<input name="nome" id="nome" placeholder="Nome Completo">
<input name="icpf" id="icpf" placeholder="CPF">
<input name="icnpj" id="icnpj" placeholder="CNPJ">
Follow form in JsFiddle link