-2
我有以下几点:Javascript - 在用户单击链接时打开警报框中显示的变量?
var message = 'this is a message'
$('#textarea_feedback').html('<a href="javascript:;" onclick="alert()">Click me</a>')
是什么把message
变量的警报正确的语法?做:
$('#textarea_feedback').html('<a href="javascript:;" onclick="alert(message)">Click me</a>')
导致没有任何提醒。
这是行不通的。 – Erazihel
@Erazihel你能看到连接的+运算符吗? –
我编辑了你的答案,并将其放入片段中,查看结果 – Erazihel