开发者

Changing the value of a textfield using JQuery?

I'm using the following function to try to change a textfield to contain the folder's ID.

function changeAction(folder_id) {
alert(hi);
$('#folder_id').val(folder_id);
}

This is the html part

<a id="open" class="open" onclick="ch开发者_如何学GoangeAction(<?=$folder->id?>);">

and for some reason it refuses to work. It refuses to even alert me (was testing to see if the function is bieng called at all, it would seem it is not.)

Any ideas?

Thanks in advance,

Alex


use changeAction('<?=$folder->id?>') small change also put your hi in inverted comma's

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜