こんにちは、次のように div テーブルに行があります。
<div class="tbody plb" id="impemail">
<div class="tbc1" style="border-right:none;">
<input class="tblinput sname pvar" type="text">
<input type="hidden" class="ppre" value="">
</div>
<div class="thc2" style=" width: 75%; border-left:1px dotted #CFCFCF;">
<textarea class="tblinput semails txtInputta pvar" style="font-size:13px;"></textarea>
<input type="hidden" class="ppre" value="">
<div class="errmsg emailerr"></div>
</div>
<div class="hideRow" style="width:20px;float:right;padding:15px 0px 0px 0px;">
<img src="../../../images/redcross.png" alt="" />
</div>
</div>
そして、次のようにjQuery関数を使用してクラス「hideRow」をクリックすると、この行を削除する関数を作成しようとしました。ここでは、hideRow関数が実行されている間に入力フィールドとテキストエリアフィールドをクリアしたいので、ページをリフレッシュした後値が行に存在してはなりません。私が試したjQuery関数は次のとおりです。
$(function () {
// Delete row from PTC grid
$('.hideRow').live("click", function () {
$(this).parents('.plb').hide("slow", function () {
$(this).parents('.tblinput sname pvar').val('');
$(this).parents('.tblinput semails txtInputta pvar').val('');
});
})
});
ページのリロード後にこれらの値が存在しないように、これら 2 つのフィールドをクリアする方法を教えてください。