JavaScript DHTML/Document/write

Материал из Web эксперт
Версия от 10:20, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Append html tag value with string value

   <source lang="html4strict">

<HTML> <BODY>

<SCRIPT> var newLine = "
"; var One = "One"; var splitLine = One + newLine + One; document.write(splitLine); </SCRIPT>

</BODY> </HTML>

 </source>
   
  


Output the html tags

   <source lang="html4strict">
 

<HTML> <BODY> <SCRIPT language="JavaScript">

   var myheading="This is My Web Page!";
   var linktag="<A HREF="http://www.wbex.ru">wbex</A>";
   var sometext="text";
   var begineffect="";
   var endeffect="";
   var newsection="
"; document.write(myheading); document.write(newsection); document.write(begineffect); document.write(sometext); document.write(endeffect); document.write(newsection); document.write(linktag); document.write(newsection); document.write(sometext);

</SCRIPT> </BODY> </HTML>


 </source>