javascript - Code Does Not Work WIth at the top -
I have This works when I Here is the code: Why does this happen? @Pointy appreciate comments, in addition, make the following changes to your CSS: & lt ;! DOCTYPE html & gt; What's more at the top of my page is that the user allows to click anywhere on the page, and then redirects to another URL.
& lt ;! DOCTYPE html , but I keep it in the page
& Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; Style & gt; the body. Center page {cursor: hand; } & Lt; / Style & gt; & Lt; Script & gt; Function goto () {location.href = "http://www.google.com"} & lt; / Script & gt; & Lt; / Head & gt; & Lt; Body class = "enterPage" onclick = "goto ();" & Gt; Your content & lt; / Body & gt; & Lt; / Html & gt;
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; Style & gt; Body.enterPage {Cursor: Indicator; // no hands! } Html, body {// set document width / height 100% width: 100%; Height: 100%; } & Lt; / Style & gt; & Lt; Script & gt; Function goto () {location.href = "http://www.google.com"} & lt; / Script & gt; & Lt; / Head & gt; & Lt; Body class = "enterPage" onclick = "goto ();" & Gt; Your content & lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment