JSFiddle - React, Tailwind, and code Playground

by Ashish Mishra

HTML

movies you have watched: <span id="perk1"></span></br>




<!--*******************value of actor checked clicked here ends***************************************************-->
<!--**********************************************Code to share result begins*************************************************************-->
<button onclick="myFunction()">My score</button>



<!--**********************************************Code to share result begins*************************************************************-->
</br>
Please check the movies you have watched
<!--********************************************actor movies begin************************************************************************-->
<div class="imgs">

<div class="thumb">
<label for="img100"><img src="priyanka_chopra\gunday.jpg" height="200" width="275"/></label>
<input type="checkbox" class="chk " id="img100" name="img100" value="0" />
<label for="img95"><img src="priyanka_chopra\krrish3.jpg" height="200" width="275"/></label>
<input type="checkbox" class="chk " id="img95" name="img95" value="0" />

</div>
</div>
<!--********************************************actor movies end************************************************************************-->
  </div>
<!--******************************************actor code ends***************************************************************************-->

JavaScript

var actor=0;
$(window).load(function(){
   
    $(document).ready(function() {
        $('#perk1').html(actor);

        $("#img100").click(function() {
            if($('#img100').is(':checked'))
                actor=actor+1;
            else if(actor>0)
                actor=actor-1;
            $('#perk1').html(actor);
        });

        $("#img95").click(function() {
            if($('#img95').is(':checked'))
                actor=actor+1;
            else if(actor>0)
                actor=actor-1;
            $('#perk1').html(actor);
        });

    });


});

function myFunction()
{
window.open("result.html?score="+actor,"","width=700,height=150,top=300,left=300");
}