Просто нужна помощь для решения контрольной.
Сейчас этот код выглядит так:
!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Biography</title>
</head>
<body>
<h2>Enter your personal data</h2>
<form id="form">
<p>First name: <input type="text"></p>
<p>Last name: <input type="text"></p>
<p>Title: <input type="text"></p>
<p>Year of birth: <input type="text"></p>
<p>Place of birth: <input type="text"></p>
<p style="text-align: left"><button>Generate formal bio</button>
<button><style="vertical-align: middle"> Generate informal bio</button></p>
</p>
</form>
<p>
<script type="text/javascript">
var First name = document.getElementById('first');
var Last name = document.getElementById('last');
var Title = document.getElementById('title');
var Year of birth = document.getElementById('year');
var Place of birth = document.getElementById('place');
Generate formal bio.insertBefore( document.createTextNode('format'),Title, First name, Last name, Year of birth, Place of birth )
//Generate formal bio.appendChild(document.createTextNode('format')) ;
format.innerHTML = 'Generate formal bio';
</script>
</p>
<h2>Biography</h2>
<p id="bio"></p>
<script>
// your JS-code here
</script>
</body>
</html>
|