имеется код:
<body>
<input type="text" id="name" placeholder="your name and username here..." />
<input id="age" type="text" placeholder="your age here..." />
<input id="location" type="text" placeholder="your city here..." />
<input id="hobby" type="text" placeholder="what are your hobby?" /><br/>
<input type="radio" name="gender" value="male"/>man</br>
<input type="radio" name="gender"value="female"/>woman<br />
<button onclick="save()">Save inforation</button>
<script>
function save(name, age, city, hobby) {
name = document.getElementById("name").value;
age = document.getElementById("age").value;
city = document.getElementById("location").value;
hobby = document.getElementById("hobby").value
document.write(name +" is " + age + " years old. " +"it lives in " + city + " and it love " + hobby);
}</script>
Я хочу что бы при нажатии на кнопку "save" текст document.write а именно "it lives in" и "and it love" поменялись на женский или мужской род в зависимости от того, какой radio вы нажмете. Например если человек выбрал woman, текст с "it lives in" поменялся на "she lives in" и тоже самое с другим. Возможно ли это реализовать, если да, то была бы благодарна за подсказку как это сделать...
she
, а мужикit
... Ой, всё!)))