[$ NUM]在html中是什么意思?

时间:2019-06-20 06:18:39

标签: javascript html

我在github中看到了一些代码,人们将[$NUM]放在html文件中。标签周围没有javascript标签。这是什么意思,如何使用?

例如:

  <div class="input-tooltip">
       [$1100]<br>[$1101].
  </div>

OR

 <input autocomplete="new-password" type="password" name="register-password"
 id="register-password-registerpage" placeholder="[$1114]" />

我的猜测是,这是某种图像。但是如何使用它呢?

1 个答案:

答案 0 :(得分:1)

var target = $("#register-password-registerpage");
var placeholder = target.attr('placeholder');  

if(placeholder == "[$1114]"){
  console.log("Do something!!, the place holder is "+ placeholder);
  target.css({"background":"orange"});
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input autocomplete="new-password" type="password" name="register-password" id="register-password-registerpage" placeholder="[$1114]" />
 
 

If you wanted to you could use it like this.