Home > Net >  I have a problem with <button>. I don't know what I'm doing wrong
I have a problem with <button>. I don't know what I'm doing wrong

Time:02-14

I'm just a beginner and I'm trying to add a button with url to website.

It works in browser, but for some reason Dreamweaver keeps giving me error that special characters need to be escaped. Please help, what am I doing wrong?

Here's the button code I've written (of course button class has definition in style)

<button , onclick="location.href=url.html">url_text</button>

CodePudding user response:

Try this instead:

<button  onclick="location.href='url.html'">url_text</button>
  • Related