<html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function () { var text = $(this).text(); $("input").val(text); }); }); </script> <style> .selected { color:red; } .highlight { background:yellow; } </style> </head> <body> <div> <button>HRT1</button> <button>HRT2</button> <button>NovaTV</button> </div> <input type="text" value="click a button" /> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)