With my portfolio website, i wanted headers that would expand when hovering over them, or have a full title displayed below.
I started experimenting with javascript bout couldnt quite get it working properly!
<html>
<head>
<script type="text/javascript">
function displayDate()
{
var textchange2 = "The title of project 1" ;
var id = document.getElementById("DP");
id.innerHTML=textchange2;
}
</script>
</head>
<body>
<h1>My First Web Page</h1>
<button type="button" onmouseover="displayDate()">1</button>
<p id="DP" > </p>
</body>
</html>
I could get the button working, but it looked a little strange and i realised that i should do little tweaks like this at the end, and get the content sorted out first rather than doing it now.
No comments:
Post a Comment