通过访问 URL 链接,可在第三方系统中集成 Smartbi 整个系统。
http://localhost:18080/smartbi/vision/index.jsp?user=admin&password=manager |
假设目标登录页面为 http://localhost:18080/smartbi/vision,脚本如下所示。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JS 脚本实现登录</title> </head> <body> <form method="POST" id="formLogin" onsubmit="go();return false"> <p>用户:<input type="text" name="user" size="20" value="admin"></p> <p>密码:<input type="text" name="password" size="20" value="admin"></p> <p><input type="submit" value="确定" name="B1"></p> </form> <script language="javascript"> function go() { formLogin.action = "http://localhost:18080/smartbi/vision/"; formLogin.user.value = "admin"; formLogin.password.value = "admin"; formLogin.submit(); return true; } </script> </body> </html> |
http://localhost:18080/smartbi/vision/ |