I have a code which I have written in Javascript and HTML and its working perfectly fine how I want it to be, but the requirement is that the code should be in XML format. I don't know any XML so please help converting it.
Thank you.
Here is my code,
<html>
<head>
<title>dropdown</title>
<script type="text/javascript">
function myfun(){
var a = document.getElementById("host").value
localStorage.setItem('a',a);
var b = localStorage.getItem('a')
console.log("stored :" + a);
console.log("retrived :" + b);
return b;
}
</script>
</head>
<body onload="myfun()">
<h1 align="center">Example</h1>
<hr />
<a href="first.html" target="_top">Home</a>
<a href="authentication.html" target="_top">Authentication</a>
<a href="help.html" target="_top">Help Desk</a>
<a href="fabric.html" target="_top">Fabric</a> <br> <br>
<select id="host" name="Host" onchange="myfun()">
<option value="10.11.0.34">10.11.0.34</option>
<option value="10.11.0.35">10.11.0.35</option>
<option value="10.11.0.36">10.11.0.36</option>
</select>
<p>this is home page</p>
</body>
</html>
` tags. Other than that you're missing an XML header that specifies a correct encoding. – Sergiu Paraschiv Oct 03 '16 at 08:00