search

Home  >  Q&A  >  body text

Why, sir, can you have two IDs on the button with the same ID="loginbtn" without reporting an error?

<div class="layui-form-item" id="loginbtn">    <button  class="layui-btn" lay-filter="save" lay-submit="" type="button" id="loginbtn">        登 录    </button></div>

狗尾巴草狗尾巴草1739 days ago1309

reply all(1)I'll reply

  • Yang_Sir

    Yang_Sir2020-04-13 13:33:00

    No error will be reported if the program repeats the ID. The same page ID is not repeated, it is just a rule that everyone follows, which is convenient for yourself and others

    reply
    0
  • Cancelreply