Click method to pass parameters in a tag generated by for loop

problem description

report an error according to my method as follows
clipboard.png

clipboard.png

clipboard.png

clipboard.png

related codes

/ / Please paste the code text below (do not replace the code with pictures)
var wenzi =""+ messionnew_date.item +""

function showItemData(){
       console.log("!!",this_item);
       
    }

what result do you expect? What is the error message actually seen?

can you click to get the parameters in this case

Aug.30,2021

I don't quite understand your question
what is the situation you are talking about?
what parameters do you want to get?

this is not a string parameter, this is a value, and this value does not exist

should be so

   <a onclick="showItemData('dq_test_')"></a>

var wenzi = '<a onclick="showItemData(\'' + this_item + '\')">'

var weizi =''
1. Pass a string
2. When concatenating strings, we should pay attention to single quotation marks, double quotation marks and escape characters

.
Menu