Delete cookies in java script
<p>My actual prob is <a href="http://stackoverflow.com/questions/9428458/asp-post-back-issue-and-html-controls">asp post back issue and html controls</a>.<br>
i try to solve this in this way.<br></p>

<pre><code>if ($('#rdb1').attr("checked")) {
                document.cookie = $('#rdb1').attr("id");
                check = document.cookie.split(';');
                flag = check[0];

            } else {
                document.cookie = $('#rdb2').attr("id");
                check = document.cookie.split(';');
                flag = check[0];
            }



            if (flag == "rdb1") {
                $('#rdb1').attr("checked", true);
                $('#rdb2').attr("checked", false);


            } if (flag == "rdb2") {
                $('#rdb1').attr("checked", false);
                $('#rdb2').attr("checked", true);
        }
</code></pre>

<p>its work.But how to  remove cookie i dont know.I search hear and find<a href="http://stackoverflow.com/questions/2144386/javascript-delete-cookie">javascript - delete cookie</a> I don't want a  function.Just want to delete cookies in next button.how to do this?Thanks.</p>
