Why does the fun parameter transfer in innerHTML not work?

        for (var i = 0; i < pcities.length; iPP) {
            //pcities[i]//{name: "", id: 438}
            str2 += "<li onclick="selectcity("+ pcities[i].id+","+pcities[i].name +");"><i class="datadd" ></i></li>";
        }
        cittty.innerHTML = str2;
        for (var i = 0; i < pcities.length; iPP) {
            oI[i].innerHTML = pcities[i].name;
            oI[i].id = pcities[i].id;
        }

I want to write a method for each li to selectcity, his id and name, but when I click on Xingan, I will report "Xingan is not defined" . If the parameter is directly written in pcities [I], it becomes "selectcity ([object Object]);" , what should I do with the passed parameters?

May.04,2021

'< li onclick= "selectcity ('+ pcities.id +', " '+ pcities.name +' ");" > '


 for (var i = 0; i < pcities.length; iPP) {
            //pcities[i]//{name: "", id: 438}
            str2 += '<li onclick="selectcity(\''+ pcities[i].id+'\',\''+pcities[i].name +'\');"><i class="datadd" ></i></li>';
        }

'selectcity (' +'\ "'+ pcities [I] .id +'\",\ "+'+)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e33efc-43a04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e33efc-43a04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?