Javascript弹出框显示问题

时间:2011-12-08 21:18:01

标签: javascript

我是JavaScript的程序员。 我写了以下函数来点击电子邮件获取弹出框  在abc.php上

<span class="subbodyheader">E-mail: </span>

            <SCRIPT TYPE="text/javascript">
            <!-- 
            // protected email script by Joe Maller(credit)
            // JavaScripts available at http://www.joemaller.com

             emailE=('abc@' + 'XYZ.com')
             document.write('<a onclick="show_confirm()" >' + emailE + '</a>')
             //-->
            </script>




<script type="text/javascript">
 function show_confirm()
 {
    var title = "WXY LLP - Email Disclaimer"
    var msg1="The sending of an email to WXY  ('SAL') lawyer does not create an attorney-client relationship.  " 
    var msg2 = "This website presents general information about SAL and nothing contained in this site is intended as legal advice to you or anyone else and you should not consider it as such. Please be aware that anything you send to anyone at SAL will not be treated as or considered to be confidential from disclosure  unless we have formally agreed to represent you for a particular matter and we have completed a conflicts check. Unless we have created an attorney-client relationship.No information that you  provide to us will prevent SAL from representing a different client in the same matter. "
   //Also, please be aware that until an attorney-client relationship with you exists, SAL is entitled to use any  information that you provide to us in the representation of another client.As a result, you should not send  confidential information to anyone at SAL until you are notified that a formal attorney-client relationship has been established."
    var msg3 =" By clicking 'Ok' in this box and sending this email, you confirm that you have read and understand this notice."

 if (confirm(title + "\n"+ "\n" + msg1 + "\n"  +msg2 + "\n"+ "\n" + msg3 +"\n")==true)
 {
  //window.resizeTo(25,90); //For fixing the window size.
  emailE=('abc@' + 'XYZ.com')
  //document.write('<a href="mailto: ' + emailE + ' " >' + emailE + '</a>') 
  window.location.href = "mailto:abc@XYZ.com"   
 }
 else
 {
  //alert("You pressed Cancel!");
 } 
}
 </script>

我有以下问题 -

  
      
  1. 当我取消注释最后两行时,即。 [//此外,请注意,在与您建立律师 - 客户关系之前,SAL有权使用您在另一位客户的代理方面向我们提供的任何信息。因此,您不应将机密信息发送给任何人在SAL,直到您被告知已建立正式的律师 - 客户关系。“]   整个页面向右移动。我不知道为什么会这样做?
  2.   
  3. 我想让var'title'加粗,所以我使用了title.bold(),但它不能用'confirm'吗?我该怎么做才能实现这个目标?
  4.   
  5. 这是否足够安全,可以在页面上执行此类操作?
  6.   

0 个答案:

没有答案