I\'m going to implement logout button in my PhoneGap application, which will return the user into authentication page (with cleared fields). For the button
If you use the onclick attribute, what goes in the quotes is an actual statement, not just the name of a function. So:
Also note that because you're not doing anything to prevent the default action of following the link, the browser will follow the href, which being # takes you to the top of the current page. You can prevent that (if you like) by adding a return false;:
I couldn't follow the second part of your question, but I'll just note that you don't need or want the javascript: on the onclick attribute in your second example. You only use that pseudo-protocol where a URI is expected (for instance, the href of an anchor). The content of onXYZ attributes is always code, not a URI.
Finally: Unless you're doing something with styling, both of those links are going to be pretty hard to click, what with being empty. :-)