<button onclick="cll(event, '#rw')">текст</button>
<script>
function cll(event, selector) {
var form = document.querySelector(selector)
if (form.style.display == "none") {
form.style.display = "block"
} else {
form.style.display = "none"
}
}
</script>