- function TestClass()
- {
- var first = new JTClass();
- first.method("M1", false,
- function ()
- {
- alert('Hello!');
- }
- );
- var second = new JTClass(first);
- second.method("My", false,
- function ()
- {
- second.M1();
- }
- );
- var finalС = new JTClass(second);
- finalС.My();
- }
- yourclass.method("MyMethod", true, fucntion (){});
- function TestList()
- {
- var myList = new JTList();
- myList.addItem("First");
- myList.addItem("Second");
- myList.addItem("Third");
- myList.sort();
- myList.printList();
- myList.clear();
- myList.dispose();
- }
- <body> <input type = "submit" id = "ok">
- <input type = "text" id = "cancel">
- <script>
- JT(function()
- {
- $("attr:id = ok||cancel").find("attr:id = ok").list().printList();
- });
- </script>
- </body>
- JTPrintObject(document, true);
- //该片段来自于http://www.codesnippet.cn/detail/040620133779.html
来源: http://www.codesnippet.cn/detail/040620133779.html