<script> function f(param) { alert(param); } </script> <span id="val_1" onclick="f(this.innerHTML)">1000</span>