I want to pass the value of selected list item to the other page,means if I m selecting abc from the list then this abc value passes to the next html form a
There are different ways to do it
Store the selected item in the cookies
// Store it in the cookies
document.cookie="selected=john"
// Get it in the profile.html
var cookie = document.cookie;
Store the selected item in the local storage
// Store it in the local storage
localStorage.setItem('selected', 'john');
// Get it from the local storage
var selected = localStorage.getItem('selected');
Use query parameter(Recommended)
You can pass the selected item in query parameter of profile.html?selected=john. I recommend this method. You can read the selected item by location.search