掲示板

div onclick with parameters

7年前 に Madasamy P によって更新されました。

div onclick with parameters

Junior Member 投稿: 90 参加年月日: 16/07/27 最新の投稿
<tbody id="issues1"></tbody>

<script>
var preview = dataList.previewURL;
$("#issues1").append('<tr><td style="padding-left:0px;"><div style="height: 25px;width: 25px;border:1px solid #A9A791;background: url('+dataList.previewURL+')no-repeat;background-size:100% 100%;" onclick="PreviewImage('+preview+');"></div></td><td>'+dataList.artName+'</td><td>'+problem.substring(3)+'</td></tr>');


function PreviewImage(url){
alert(url);
}
</script>


The preview variable not passed to the PreviewImage function
But I don't pass the parameter to function e=when clciking the div the alert works
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: div onclick with parameters

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Madasamy P:
The preview variable not passed to the PreviewImage function
But I don't pass the parameter to function e=when clciking the div the alert works




This isn't really a Liferay issue.

Perhaps there's an introductory HTML forum out there you could post to?







Come meet me at the 2017 LSNA!