Jquery how to enter the page only show the corresponding field data after the user clicks to edit all the input select can be edited, find a way of thinking

how can jquery enter the page and only display the corresponding field data before all input select can be edited after the user clicks to edit? find a way of thinking

Mar.22,2021

disabled


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
    
  </style>
</head>
<body>

  <input type="text">
  <input type="text">
  <input type="text">

  <button class="btn1"></button>
  <button class="btn2"></button>

  <script src="js/jquery.min.js"></script>
  <script>
      $(".btn1").click(function(){
          $(":input").attr("readonly","readonly");
      })
      $(".btn2").click(function(){
          $(":input").removeAttr("readonly");
      })

  </script>
</body>
</html>
Menu