我很好奇这个代码有些奇怪。 HTML JAVASCRIPT

时间:2015-12-03 07:38:51

标签: javascript html

我现在从Mikrotik路由器获得了一个代码,它是模板,我遇到了一个问题,我无法理解调用变量。有人可以解释这段代码吗?我的意思是获取变量或者他们使用的是什么编程语言。

编辑:添加了整个HTML代码

<!DOCTYPE html>
<html lang="en">
<head>
<title>Mikrotik Hotspot | Session Status</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
</head>
<body>
<div id="wrap">
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">$(identity)</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="login">Login</a></li>
                <li class="active"><a href="#">Status</a></li>
                <li><a href="logout?erase-cookie=true">Logout</a></li>
            </ul>
        </div>
    </div>
   </div>

   <div id="bottom-menu">
    <div class="container">
        <div class="row">
            <div class="col-md-2 mylogo">
                <a href="http://agratitudesign.blogspot.com/" ref="index.html"><img src="img/agratitudesignlogo2.png" alt="logo"></a>
            </div> 
            <div class="col-xs-10 textlogo">
                <h1>Agratitudesign Hotspot</h1>
            </div>
        </div>
    </div>
</div>

<div class="container">
    <div class="col-md-6 col-sm-12">        
        <div class="row">
            $(if error)
                <div class="alert alert-danger">$(error)</div>
            $(endif)

            $(if login-by == 'trial')
                <div class="alert alert-info">Welcome trial user!</div>
            $(elif login-by != 'mac')
                <div class="alert alert-info">Welcome $(username)!</div>
            $(endif)
        </div>        
        <div class="row">
            <div class="panel panel-default">
                <div class="panel-body">

                    <table class="table table-striped">
                        <tbody>
                        <tr>
                            <td>IP address:</td>
                            <td>$(ip)</td>
                        </tr>
                        <tr>
                            <td>bytes up/down</td>
                            <td>$(bytes-in-nice) / $(bytes-out-nice)</td>
                        </tr>
                        $(if session-time-left)
                        <tr>
                            <td>connected / left:</td>
                            <td>$(uptime) / $(session-time-left)</td>

                        </tr>
                        $(else)
                        <tr>
                            <td>connected:</td>
                            <td>$(uptime)</td>
                        </tr>
                        $(endif)
                        $(if refresh-timeout)
                        <tr>
                            <td>status refresh</td>
                            <td>$(refresh-timeout)</td>
                            $(endif)
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>    
    <div class="col-md-6 col-sm-12">
        <div class="panel panel-default">
            <div class="panel-body">

                <div class="card hovercard">
                    <div class="cardheader">
                    </div>
                    <div class="avatar">
                    <img alt="" src="img/agratitudesignlogo.png">
                    </div>
                    <div class="info">
                    <div class="title">
                    <a href="http://agratitudesign.blogspot.com/">Agratitudesign HighSpeed Hotspot</a>
                     </div>
                     <div class="desc">Website Hotspot Interface For Free</div>
                     <div class="desc">created by <a target="_blank" href="http://agratitudesign.blogspot.com/" title="Agratitudesign Hotspot Templates">agratitudesign.blogspot.com</a></div>
                    <div class="desc">supported by <a target="_blank" href="http://wiswaweb.com/" title="Agratitudesign Hotspot Templates">wiswaweb.com</a></div>
                    </div>
                    <div class="bottom">
                    <a class="btn btn-primary btn-twitter btn-sm" href="https://twitter.com/agratitudesign"><i class="fa fa-twitter"></i></a>
                    <a class="btn btn-danger btn-sm" rel="publisher" href="https://plus.google.com/+KetutAgusSuardika"><i class="fa fa-google-plus"></i></a>
                    <a class="btn btn-primary btn-sm" rel="publisher" href="https://www.facebook.com/pages/Agratitudesign/451131721572773"><i class="fa fa-facebook"></i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

  <div id="footer">
  <div class="container">
     <p class="text-muted">Powered by <a href="http://agratitudesign.blogspot.com/">Agratitudesign</a></p>
  </div>
 </div>

 <script src="js/jquery.min.js"></script>
 <script src="js/bootstrap.min.js"></script>

 </body>
 </html>

谢谢。

1 个答案:

答案 0 :(得分:1)

我不明白你所说的Microtik ...顺便说一句,如果你检查他们的维基,你可以找到:

  • 他们使用自己的scripting language"This manual provides introduction to RouterOS built-in powerful scripting language."
  • 他们使用自己的variables

这是一个像你得到的例子 http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot