javascript - How to make a click game like the example -
i'm wondering begin create game this: http://orteil.dashnet.org/experiments/cookie/
essentially click, tally clicks, buy things auto put clicks. languages need know this? , references/tutorials there may type of thing?
also, know html/css , javascript (a little bit).
if want add clicks globally (so if click 5 times , else clicks 5 times shows 10) suggest learning php, because use write number of clicks file on server or through database. if want individual user's clicks individual session, javascript should fine. create tag , inside put cookie image. href attribute, put "javascript:" , name of function increments counter.
example:
//js var clicks = 0; function count () { clicks ++; } function disp () { //display clicks somehow } <!--html--> <a href="javascript:count()"><img src="cookie.jpg" /></a>
Comments
Post a Comment