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. NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
[TANYA] Dear All, Saya berhasil mengimplementasi... Jul 20th 2013, 00:29, by Rizky Ardiansyah | [TANYA]
Dear All,
Saya berhasil mengimplementasikan sebuah program jQuery pada localhost. Namun, ia tidak berjalan pada 'view Codeigniter'. Kenapa ya? Berikut program saya:
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> </head> <body> <select> <option id="tes"></option> <option id="tes1"></option> </select> <script> var d = new Date(); var curr_date = d.getDate(); var curr_month = d.getMonth() + 1; //Months are zero based var curr_year = d.getFullYear();
var date = curr_date + "-" + curr_month + "-" + curr_year; if(curr_month>6){ var date1 = curr_date + "-" + (curr_month-6) + "-" + curr_year; } else var date1 = curr_date + "-" + (12+(curr_month-6)) + "-" + (curr_year-1);
document.getElementById("tes").innerHTML=date; document.getElementById("tes1").innerHTML=date1; </script> </body> </html>
*saya pake CI 1.7 | | |
|
Tidak ada komentar:
Posting Komentar