Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.
<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("input[id][name$='m']").val("asdf"); }); </script> </head> <body> <body> <input id="a" name="m" /> </body> </html>