Frames Object

ក្នុង​ករណី​ដែល​មាន​ធាតុ iframe នៅ​ក្នុង​ទំព័រ HTML ធាតុ​ទាំងនោះ​គឺ​ជា​ធាតុ​នៃ​កំរង​ frames ដែល​ជា​សម្បត្តិ​របស់​វត្ថុ window នៅ​ក្នុង BOM (Browser Object Model) ។ ជាលទ្ធផល យើង​អាច​យក​ធាតុ iframe ទាំងនោះ​មក​ប្រើ​បាន​តាម​រយៈ​សម្បត្តិ frames នេះ​ ដោយ​ធ្វើ​ដូច​ខាង​ក្រោម​នេះ៖
<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Odor+Mean+Chey' rel='stylesheet'>
  </head>
  <body style="font:14px/1.5 'Odor Mean Chey'">
  	

​ចុច​នៅ​​ទី​នេះ​ ដើម្បី​​ដូរ​អាស័យដ្ឋាន iframe ដើម​គេ។

<input type="button" onclick="myFunction()" value="ដោះដូរ​" /> <iframe src="https://khmerjs.org"></iframe> <iframe src="https://khmerjs.org"></iframe> <script> function myFunction() { window.frames[0].location = "https://cambodia.itstep.org/"; } </script> </body> </html>

​ចុច​នៅ​​ទី​នេះ​ ដើម្បី​​ដូរ​អាស័យដ្ឋាន iframe ដើម​គេ។




នៅ​លើ​បន្ទាត់​លេខ 15 គឺ​ជាការ​ដោះដូរ​អាស័យដ្ឋាន​របស់ iframe នៅ​ខាង​ដើម​គេ អោយ​ទៅ​ជា https://cambodia.itstep.org/ ៕