PHP Indonesia - Facebook | PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
|
[Tanya] maaf bagi yang bisa tolong donk untuk scr... Oct 23rd 2013, 09:32, by Parman Irwan | [Tanya]
maaf bagi yang bisa tolong donk untuk script sederhana ini kira2 modifikasi'a biar jalan dengan sempurna g mana yah?
<script> var data = new Array(); function sync(indexarray,dicoba) { var x = indexarray; var y = dicoba;
y = [x, x = y][0]; //alert("X=" + x + " and Y=" + y); document.getElementById('num['+indexarray+']').value = x document.getElementById('num['+indexarray+']').placeholder = x; document.getElementById('num['+indexarray+']').id = x; document.getElementById('num[' +dicoba+ ']').value = y; document.getElementById('num[' +dicoba+ ']').placeholder = y; document.getElementById('num[' +dicoba+ ']').id = y;
} </script> <form id="form1" name="form1" method="post" action=""> <table width="100%" border="0">
<tr> <td width="38%"><b>ORDER</b></td> </tr> <?PHP $no = 1; while($no<=6){ ?> <tr> <td> <input type="text" name="num" id="num[<?PHP echo $no; ?>]" value="<?PHP echo $no; ?>" placeholder="<?PHP echo $no; ?>" size="5" onKeyUp="sync(this.value,this.placeholder)"/> </td> </tr> <?PHP $no++; } ?> </table> </form> |
| | maaf saya baru pemula, jadi baru kefikiran sampai situ. |
| | baru tau ada <?PHP biasanya kan <?php | | |
|
Tidak ada komentar:
Posting Komentar