Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <title>葡萄城报表集成</title>
  <script stype=text/javascript>
    function post(URL, PARAMS) {
      var temp = document.createElement("form");
      temp.action = URL;
      temp.method = "post";
      temp.style.display = "none";
      for (var x in PARAMS) {
      var opt = document.createElement("textarea");
      opt.name = x;
      opt.value = PARAMS[x];
      temp.appendChild(opt);
    }
    document.body.appendChild(temp);
    temp.submit();
    return temp;
   }
  </script>
 </head>
 <body>
  <div class="top">
   这个示例展示业务系统与葡萄城报表集成的POST方式。<br/> <br/>
  </div>
  <br />
  <input id="Button1" type="button" value="报表门户" onclick="return post('http://localhost:8080/explorersso.ashx', {uid:'admin',pwd:'12345'});" />
  <br />
 </body>
</html>


将上述代码保存为一个HTML文件,用浏览器打开,您将看到下图所示的网页:将上述代码复制到记事本或其他文本编辑器,修改uid和pwd参数的值为报表系统实际用户名和密码,再以UTF-8编码格式保存为一个HTML文件,用浏览器打开,您将看到下图所示的网页:


点击【报表门户】,您将不经登录,直接看到报表门户页面。

...