How to add a var into a href attr

93 مرّة مشاهدة
التخطي إلى أول رسالة غير مقروءة

Alexis Meno

غير مقروءة،
04‏/02‏/2015، 4:33:16 ص4‏/2‏/2015
إلى 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
الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة