Get text and put in attribute value
<p>I'd like to get the text from between the "p" tags and put it in the title value.</p>

<p>before:</p>

<pre><code>&lt;option title="" value="Put Text"&gt;Put Text&lt;/option&gt;
</code></pre>

<p>after:</p>

<pre><code>&lt;option title="$1,179.83" value="Put Text"&gt;Put Text&lt;/option&gt;
</code></pre>

<p><br /></p>

<p>Anyone know a javascript that can accomplish this?</p>

<p><br /></p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Get text and put in attribute value&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;


&lt;div class="Text"&gt;
 &lt;p&gt;$1,179.83&lt;/p&gt;
&lt;/div&gt;


&lt;form action=""&gt;

  &lt;fieldset&gt;

    &lt;select class="putText" name="put-Text"&gt;
      &lt;option title="" value="Put Text"&gt;Put Text&lt;/option&gt;
    &lt;/select&gt;

  &lt;/fieldset&gt;

&lt;/form&gt; 


&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><br />
<br />
<strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**</strong> UPDATE 2011-09-13 <strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**</strong></p>

<p>Code is working now. The code also works for ie6-8:<br /></p>

<p><a href="http://jsfiddle.net/EFLym" rel="nofollow">GET TEXT AND PUT IN ATTRIBUTE VALUE</a></p>
