私はいくつかのデータを含むリンクを持っています
例えば
<li><a href="" onclick="getcategory(this);"><?php echo $result22['category']; ?></a></li>
このリンクでこの$result22['category'];
値をajax関数に渡したいのですがこれを試しています
<script type="text/javascript">
function getcategory(cat)
{
var id = cat.value;
alert("hi" + id);
}
</script>
しかし、アラートボックスに未定義が表示されます
何が間違っているのですか?$result22['category'];
アラートボックスのの正しい値を取得していません