以下にこのコードを示します。リンクをクリックすると、アラート (linkhref) が表示されます。私の質問は、その (linkhref) を $_post[''] のように php (sample.php) に投稿する方法です。
ありがとう、
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
$('.linklist').click(function(){
var linkhref=$(this).attr('href');
alert (linkhref);
$.post("sample.php", { href: linkhref } );
});
});
</script>
html:
< a href="files/my_file.zip" class="linklist" name="test">test insert < /a>