خرید بک لینک

Vote count: 0

I'm using this Jquery function to encode, letter by letter, the users password in my page.

function encoding() {

var passlc = $("#password").val().trim();

for (var i = 0, $len = passlc.length; i < $len; i++) {
    var lone = passlc[i].pass('encode');
$("#passwordenc").append(lone);

}

This method retus the encoded password inside one div #passwordenc, so, anyone who access the page source code can view this even if I hide the element.

My idea to store the value without this problem is using Jquery data(), but I don't know how can I store multiple values in the same variable.

First test:

function encoding() {

var passlc = $("#password").val().trim();

for (var i = 0, $len = passlc.length; i < $len; i++) {
    var lone = passlc[i].pass('encode');
$("#passwordenc").data({"pass":lone});

}

When I get the value, only the last caracter retu from data.

How can I store all values to retu later?

Thanks!

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 5 ارديبهشت 1395 ساعت: 7:02

صفحه بندی