How to add a var into a href attr

93 views
Skip to first unread message

Alexis Meno

unread,
Feb 4, 2015, 4:33:16 AM2/4/15
to raph...@googlegroups.com
Hello,

Hi want to add a variable into a href attr

Code :

var link = [something.text];

and i want to add this var into a shapes href attr :

shapes.attr("href","javascript:alert(link);");

I want to show the text of the variable, link, in a alert window when we click on the shape.


Thank for yours answers bye
Reply all
Reply to author
Forward
0 new messages