Changer.com - Instant Exchanger
Get Paid To Promote, Get Paid To Popup, Get Paid Display Banner

Sunday 25 December 2016

Cara Memasukkan Halaman Lain dengan iFrame

Pada artikel kali ini kita akan mencoba memasukkan halaman lain atau web lain ke dalam sebuah kotak di dalam halaman web kita. Dengan begitu, kita bisa menampilkan web lain di web kita tanpa takut kehilangan tampilan asli web.
Sebagai contoh saya ingin menampilkan halaman 4shared di artikel seperti ini:



Keren bukan?
Dan inilah kode untuk menampilkan iframe seperti diatas:

<iframe src="http://m.4shared.com/" width="100%" height="400">
Browser anda tidak support frame
</iframe>

iframe memiliki beberapa atribut. Dalam contoh diatas saya menggunaka atribut SRC untuk menentukan halaman apa yang ingin dimuat, WIDTH adalah lebar frame-nya dan HEIGHT adalah tinggi.
Selain itu ada beberapa atribut lain yaitu:

Attribute Value Description DTD
align left
right
top
middle
bottom
Deprecated. Use styles instead.
Specifies the alignment of an iframe according to surrounding elements
TF
frameborder 1
0
Specifies whether or not to display a border around an
iframe
TF
height pixels
%
Specifies the height of an iframe TF
longdesc URL Specifies a page that contains a long description of the
content of an iframe
TF
marginheight pixels Specifies the top and bottom margins of an iframe TF
marginwidth pixels Specifies the left and right margins of an iframe TF
name name Specifies the name of an iframe TF
scrolling yes
no
auto
Specifies whether or not to display scrollbars in an iframe TF
src URL Specifies the URL of the document to show in an iframe TF
width pixels
%
Specifies the width of an iframe TF

Mudah-mudahan bermanfaat ya
Paid2YouTube.com