この記事では、JSの方法について説明して、IFRAMEがロードされているかどうかを判断します。次のように、参照のために共有してください。
<!doctype html public " - // w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <head> <meta http- equiv = "content-type" = "/html; charset = gb2312 "> <title> </title> </head> <body> <script =" text/javascript "> var isie = /msie/i.test(navigator.useragent)&&!window.opera; iframe.onreadystatechange = function(){if(iframe.readystate == "loaded" || iframe.readystate == "complete"){alert( "loaded"); }};} else {iframe.onload = function(){alert( "loaded"); };} document.body.appendChild(iframe); </script> </body> </html>または:
<!doctype html public " - // w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <head> <meta http- equiv = "content-type" = "/html; charset = gb2312 "> <title> </title> </head> <body> <script =" text/javascript "> var iframe = document.createelment(" iframe "); iframe.src =" //www.vevb.com/"; alert( "loaded");} else {iframe.onload = function(){alert( "loaded"); };} document.body.appendChild(iframe); </script> </body> </html>JavaScript関連のコンテンツの詳細については、このサイトのトピックをご覧ください:「JavaScript操作IFRAMEスキルの要約」、「JavaScript検索アルゴリズムスキルの要約」、「JavaScriptデータ構造とアルゴリズムスキルの要約」、「Javascript Traversal AlgorithmsおよびTechnary in technary opers opers opers opers opers」 JavaScriptのスイッチング特殊効果とスキル「、「JavaScriptアニメーションの特殊効果とスキルの要約」、「JavaScriptエラーとデバッグスキルの概要」、「JavaScriptの数学操作の使用法」の要約」
この記事がみんなのJavaScriptプログラミングに役立つことを願っています。