qqzy168

根据端口号(http和https的)跳转到不同的工程
例子:
输入IP+8080(https:8443)跳转到myweb
输入IP+8090(https:8449)跳转到mybms

思路:默认情况只输入ip+port,不输入工程名,则默认走tomcat的webapps下的root工程,走index.xml页面

<html>
<script>
 
 alert(window.location.port);
 if(window.location.port == "8080"||window.location.port == "8443")
 {
   location.href="myweb";
 }
 else if(window.location.port == "8090"||window.location.port == "8449")
 {
   location.href="mybms";
 }

</script>
</html>

分类:

技术点:

相关文章:

  • 2021-11-22
  • 2021-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-11-22
  • 2021-12-13
猜你喜欢
  • 2021-06-05
  • 2021-09-07
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-06-18
相关资源
相似解决方案