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
- How to create Grid .. and save the points with Ajax technology or using jquery ? 开发者_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.
精彩评论