title: how to set selected li value to input with jquery
body: <p>I don't know how to use jquery the get the result:</p>
  
  <ol>
  <li><p>click the li will add select class and remove others selected li</p></li>
  <li><p>set the select li datavalue to input(id:sizevalue)</p></li>
  <li><p>make sure the li list should be selected one when click submit button</p>
  
  <pre><code>&lt;form name="form"&gt;
  &lt;style&gt;
      #sizelist ul{list-style-type:none;}
      #sizelist ul li{float:left;display:inline;margin-right:5px;width:auto;overflow:hidden;}
      #sizelist ul li a{display:block;border:1px solid #CCCCCC;padding:5px 6px 5px 6px;margin:1px;}
      #sizelist ul li a:hover{border:2px solid #FF6701;margin:0px;}
      #sizelist .select a{border:2px solid #FF6701;margin:0px;}
  &lt;/style&gt;
  
  &lt;ul id="sizelist"&gt;
      &lt;li datavalue="S"&gt;&lt;a href="javascript:void(0);"&gt;S&lt;/a&gt;&lt;/li&gt;
      &lt;li datavalue="M"&gt;&lt;a href="javascript:void(0);"&gt;M&lt;/a&gt;&lt;/li&gt;
      &lt;li datavalue="L"&gt;&lt;a href="javascript:void(0);"&gt;L&lt;/a&gt;&lt;/li&gt;
      &lt;li datavalue="XL"&gt;&lt;a href="javascript:void(0);"&gt;XL&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;input id="sizevalue" size="15" name="size" type="text" /&gt;
  &lt;input type="button" value="submit"/&gt;
  &lt;/form&gt;
  </code></pre></li>
  </ol>
  
  <p>plz help</p>