Jump to content

using quotes in html in vbscript


zob
 Share

Recommended Posts

does anyone know if there is a way to use quotation marks for html attributes when you're doing them in vb. the main way i'm wondering is how to use vb subs for stuff like the onclick event that you are making with the document.write ("...") line.

Link to comment
Share on other sites

I'm having the same problem as this guy but with Javascript.I thought you could use double quotes to indicate speechmarks within a string e.g. '' or "" but I can't get it to work.In my case though, it would be easier if anyone can tell me how to add a custom attribute to a control as this would get round the problem.

Link to comment
Share on other sites

You have to propery nest the quotes or use the backslash.puting single quotes inside double quotesEscaping special characters<script>document.write("<a href='http://www.google.com'>google</a><br />");document.write("<a href=\"http://www.google.com\">google</a>");</script>http://www.w3schools.com/js/js_special_characters.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...