jQuery: Editing the value attribute


The jQuery Code START
    
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
      function inserter() {
        $("#target").val("This is new text.");
      }
    </script>
    
    <style type="text/css">
        .code { color: red; }
        .back { background-color: yellow; }
    </style>
  </head>

  <body>
    <h1>jQuery: Editing the value attribute</h1>
    <br>
    <form action="">
    <input type="text" id="target"></input>
    <input type="button" value="Insert new text" onclick="inserter()"></input>
    </form>