【问题标题】:Adobe Dynamic Form: Javascript to find URL domain the form is open underAdobe 动态表单:用 Javascript 查找表单在其下打开的 URL 域
【发布时间】:2013-08-10 05:56:15
【问题描述】:

我已经尝试了所有我知道的 javascript 方法来确定域是什么。我需要表单在按下按钮时做出不同的反应,具体取决于它在哪个站点中打开。到目前为止,没有任何效果,我只能找到有关如何确定客户端是 Reader 还是浏览器的文档。然而,这对我没有帮助。

【问题讨论】:

    标签: javascript adobe livecycle-designer


    【解决方案1】:

    in 运算符非常漂亮...

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>JavaScript Domain</title>
    <script type="application/javascript">
    //<![CDATA[
    window.onload = function(e)
    {
     for (i  in window.location) {alert('i = '+i);}
     alert(window.location.host);
     alert(window.location.hostname);
    }
    //]]>
    </script>
    </head>
    
    <body>
    
    <div><p>JavaScript Domain</p></div>
    
    </body>
    </html>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      相关资源
      最近更新 更多