Tutorial Melayu

Tutorial Melayu

Tutorial Teknologi dan Atur Cara dalam Bahasa Melayu


Navigation
Tagprint_r dalam javascript
Featured

javascript

print_r dalam javascript

Posted byuserFairuz on November 18th, 2009.

Fungsi Javascript yang fungsinya seakan fungsi print_r PHP function print_r(theObj){ if(theObj.constructor == Array || theObj.constructor == Object){ document.write("") for(var p in theObj){ if(theObj[p].constructor == Array|| theObj[p].constructor == Object){ document.write("["+p+"] => "+typeof(theObj)+""); document.write("") print_r(theObj[p]); document.write("") } else { document.write("["+p+"] => "+theObj[p]+""); } } document.write("") } } Selamat mencuba.