<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<input type="text" id="width">
<input type="text" id="height">
<button>Magic button</button>
<script>
var data = {
width: '1000мм',
height: '2000мм'
}
document.querySelector('button').onclick = function() {
Object.keys(data).forEach(function (key) {
document.getElementById(key).value = data[key];
});
}
</script>
</body>
</html>