JavaScript substring from an element
<p>This is some simple JavaScript code I would like to implement, butit does not work.</p>

<p>I'm trying to get the file link inside the tag <code>file</code> but I think <code>innerHTML</code> does not work in this kind of situation, but I've given it a shot to try.</p>

<p>Could you guys help me with this? I know I'm missing something here.</p>

<pre><code>[videoplayer id="one" file="/dir1/dir2/hi.mp4" width="333" height="333" /]


&lt;script type="text/javascript"&gt;
var str = document.getElementById('one').innerHTML;
document.write(str.substr(0,str.length-1));
&lt;/script&gt;
</code></pre>
