0
0
0leg5ergeev2015-11-03 18:33:48
JavaScript
0leg5ergeev, 2015-11-03 18:33:48

How to change placeholder?

I change the text on the page relative to the utm tag. There was a desire to change the placeholder of one inputa'a.

This is how a simple text changes, there is no problem with this.

if(number == 'prodazhi') {$('#utm_title').html('Продажи!');


How can I change the placeholder of such an element?
<input type="text" name="mySecondInput" onkeyup="writeMessage()" size="50" placeholder="http://example.com/">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2015-11-03
@IonDen

Better and more modern .prop()

I
inDeepCode, 2015-11-03
@inDeepCode

.attr()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question