I find many times the pages use "a" tag and want to make it like a button. it's something like this:was ist der Unterschied zwischen <Taste onClick = ...> und <a href="#" onclick=.../>
<a href="#" class="button" onclick="...." />
I'm confusing about why not just use "button" tag? like this:
<button onclick="....">button</button>
what is the difference between? I really want to learn it, thanks!
One more situation question:
Three "button-like < a > tag" as below:
Hint:
- Different one call ajax then get different period record
- Need to use onclick="location.replace()" because back to last page smoothly.
Original code:
<a href="url" class="btn" >Today</a>
I have changed to:
<a href="#" onclick="location.replace(url)" class="btn" >Today</a>
Consider about:
<button onclick="location.replace(url)">Today</button>
What will you do in this situation? Is any incorrect to use button tag ?
BTW, Typ = Taste ist für , nicht – dandavis
auch, Taste ist nicht selbstschließend. – Kolby
@dandavis und Kolby, danke euch Leute, ich habe es geändert. –