first name
Same as first name
second name

This coding can only when click the checkbox. It will fill same value from textfield ab to textfield zb
But I want to when click the checkbox. it will also make the same value from textfield bb to textfield yb

How can I write the script?

Recommended Answers

All 2 Replies

first name
Same as first name
second name

Code blocks are created by indenting at least 4 spaces
... and can span multiple lines

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
fname:<input type='text' id='name11' name='ab' value=''>
<input type='text' id='name12' name='zb' disabled='disabled'><br>
sname<input type='text' id='name2' name='name2' value=''>
<button id='button1' name='chckbutton' onmouseup="document.getElementById('name12').value = document.getElementById('name11').value;"> click </button>
sample code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.