开发者

how to create 5 X 5 grid in PHP ajax?

I'm doing project on Graphical based password and the case is i'm creating a 5X5 grid on webpage,and use will click on the points on grid and the points will save in database, the concern is

  1. How to create Grid .. and save the points with Ajax technology or using jquery ?
  2. 开发者_JAVA技巧


A grid could be both <div> based or using a <table>.

You can give every element class a unique ID and trigger on that.

On the top of my head, a bit like:

<div class="button" id="b1">A</div>

<div class="button" id="b2">B</div>

<div class="button" id="b3">C</div>

And in your JQuery code you'd do a

$('.button').click(function(){
 $.post("auth.php", { which: $(this).attr("id") });
});

Whereby your server script (auth.php) could trip which button is pressed, and hence do authentication that way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜