JavaScript DHTML/Mochkit/camelize

Материал из Web эксперт
Перейти к: навигация, поиск

camelize function

   <source lang="html4strict">


<html> <head>

   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/Base.js"></script>
   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/Iter.js"></script>
   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/DOM.js"></script>
   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/Style.js"></script>
   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/Logging.js"></script>
   <script type="text/javascript" src="MochiKit-1.4.2/lib/MochiKit/Iter.js"></script>

</head> <body>

<script type="text/javascript">
    alert(camelize("one"));
    alert(camelize("one-two"));
    alert(camelize("one-two-three"));
    alert(camelize("1-one"));
    alert(camelize("one-"));
    alert(camelize("-one"));
    alert(camelize("o-two"));
</script>

</body> </html>

 </source>