Using php in a webpage and struggled with anchoring to the top, so I'm using a line of javascript to accomplish what I want. The code is:
<script language="JavaScript" type="text/javascript">
<!--
document.write("<a href= \"" + document.location + "#top\" >Top of Page</a>");
// -->
</script>
Only problem is, I want to take the code and add a:
class="bmenu"
line to it so it will be formatted the same as other links (color, font, etc.). I know nothing of javascript, so this is probably a simple thing, but would be a really helpful workaround for those who need to link to the top of a page, but have limitations as to which method they can use.
Thanks in advance!
Here's what the code looks like for those curious.
I have a .php file titled bmenu.php that contains a bottom menu that is added to every page. It contains
| 
<a href="index.php" class="bmenu">Home</a>
 | 
<a href="about_us.php" class="bmenu">About Us</a>
 | 
<a href="find_us.php" class="bmenu">Find Us</a>
 | 
<a href="contact_us.php" class="bmenu">Contact Us</a>
 | 
<script language="JavaScript" type="text/javascript">
<!--
document.write("<a class=\"bmenu\" href= \"" + document.location + "#top\" >Top of Page</a>");
// -->
</script>
 |
and then in each file that I want this menu I add
<?php include 'PHP/bmenu.php'; ?>
This saves typing and enables me to make a single edit to the menu rather than editing every page that I want that menu on every time I want to change it.