2013-10-17 53 views
0

我在<body>結束標記之外編寫了JavaScript。 Firebug無法檢測到JavaScript,我無法檢測到JavaScript錯誤。爲什麼Firebug無法檢測到一些JavaScript?

這裏是我的代碼:

</body> 
<script type="text/javascript"> 

function displayIFrameContent() 
{ 
    var iFrame = document.getElementById("link"); 
    var if1= "<iframe src='http://leadmarket.hol.es/forms/solar-power.php?adv_id=" + <?php echo($fetch_users_data['id']); ?>; 
    var if2= "<iframe src='http://leadmarket.hol.es/forms/kitchen-installation.php?adv_id=" + <?php echo($fetch_users_data['id']); ?>; 
    var if3= "<iframe src='http://leadmarket.hol.es/forms/conservatory.php?adv_id=" + <?php echo($fetch_users_data['id']);; ?>; 

    var host = document.getElementById("host"); 
    var subId = document.getElementById("subid"); 
    var errorClass = "box form-validation-error border-width-2"; 

    if(host.value == "") 
     changeClass("host", errorClass); 

    if(host.value != "") 
    {  
     var iFrameEnd = " width='280' height='330' frameborder='0' scrolling='no'></iframe>"; 

     var leadTypeSelect = document.getElementById("leadType"); 
     var leadTypeValue = leadTypeSelect.options[leadTypeSelect.selectedIndex].value; 

     iFrame.value = ""; 

     if(leadTypeValue == 1) 
      iFrame.value = if1 + "&" + "sub_id=" + subId.value + "&source=" + host.value + "'" + iFrameEnd; 

     if(leadTypeValue == 2) 
      iFrame.value = if2 + "&" + "sub_id=" + subId.value + "&source=" + host.value + "'" + iFrameEnd; 

     if(leadTypeValue == 3) 
      iFrame.value = if3 + "&" + "sub_id=" + subId.value + "&source=" + host.value + "'" + iFrameEnd; 
    }  
} 


function changeClass(id, classname) 
{ 
    document.getElementById(id).setAttribute("class", classname); 
} 
</script> 
</html> 

您的幫助將不勝感激。提前致謝!

+0

你關閉''的''

相關問題