I am creating a webpage in which I want to replace an element with a <span>new element <span>. The source element <span>is (for example):
<span class="green_link">;Abbreviation;The definition</span>
The form of the attached string <separator><string><separator><string>. A separator is provided to ensure that any special characters in the first or second line do not cause parsing problems.
The JavaScript function is called by the event handler onloadfor the element <body>. It discovers everything <span>with the class "green_link". If this <span>does not exist, the function ends. Otherwise, for each such <span>function, a new element is created <span>:
<span class='revised_green_link'>
<span class='abbreviation_alone'>
Abbreviation
</span>
<span class='abbreviation_definition'>
<a id='greenlink_1'></a>
<a href='#greenlink_1'
style='text-decoration:none;
font-weight:bold;'>
<span class='abbreviation'>
Abbreviation
</span>
<span class='definition'>
The definition
</span>
</a>
</span>
</span>
"green_link" <span> "modified_green_link" <span>.
. Firefox 3.6.12, Opera 11.11 Safari 5.0.2 , . Chrome 12.0.742 , , . IE 8 , .
, -, , localhost:port , Visual Studio 2008 " " (.. http://localhost:1291/BIODAB.html).
HTML XHTML 1.0 Strict W3C. CSS ( , ) CSS 2.1 W3C CSS. JavaScript, jQuery JavaScript Library v1.4, JSLint .
, , .