in the below example,by clicking the log button,it shows in the log the div's markup which consists of inputs without a predefined value attribute like this: `<input><input><input><input><input><input>`,even if i type some text in the inputs it logs the same thing.

i want to use the button #add to give all inputs the value attribute,and the content should be the current value of them,so next time i'll click log should show this : `<input value"CURRENT VALUE.."><input value"CURRENT VALUE.."><input value"CURRENT VALUE.."><input value"CURRENT VALUE.."><input value"CURRENT VALUE.."><input value"CURRENT VALUE..">`

is there a simple method to do this with jquery ?

```js
$(document).on('click', '#log', function() {
  console.log($('div').html())
});

$(document).on('click', '#add', function() {

  //GIVE ALL INPUTS THE "value" ATTRIBUTE AND SET THEIR CURRENT VALUE AS CONTENT

});
```

```css
input,
button {
  float: left;
  clear: both;
  margin: 2px;
}
```

```html
<!DOCTYPE html>
<html>

<head>
  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</head>

<body>
  <button id="log">LOG HTML</button>
  <button id="add">ADD VALUE ATTRIBUTE</button>
  <div>
    <input><input><input><input><input><input>
  </div>
</body>

</html>
```