0
即时通讯使用名为Textualizer的jQuery插件,并且我想通过HTML 表单向其添加数据。尝试使用HTML表单将文本添加到jQuery插件
继承人的代码:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="textualizer.min.js"></script>
</head>
<style type="text/css">
#txtlzr{color:#585856; font-size:50px; width:1200px; height:100px;
margin-left:10%;
margin-top:80px;
font-family:"futura";
position: fixed;
}
</style>
<body>
<div id="txtlzr"></div>
<form action="#" method="post"/>
<input class="kwote" type="text" maxlength="40" id="kwote" placeholder="Enter a something here."/>
<input class="name" type="text" maxlength="17" id="name" placeholder="Enter your name."/>
<input class="post" type="submit" value="Post"/>
</form>
</body>
<script>
var stuff1 = ['"random comment-person1', '"random comment"- person2']; // list of blurbs
var txt = $('#txtlzr'); // The container in which to render the list
var options = {
duration: 5, // Time (ms) each blurb will remain on screen
rearrangeDuration: 5, // Time (ms) a character takes to reach its position
effect: 'random', // Animation effect the characters use to appear
centered: true // Centers the text relative to its container
}
txt.textualizer(stuff1); // textualize it!
txt.textualizer('start'); // start
</script>
</html>
这是完整的代码,并且只要你有联系的jQuery和textualizer文件或与HTML目录将工作。
textualizer:http://kiro.me/textualizer/javascript/textualizer.min.js
的jQuery:http://code.jquery.com/jquery-1.7.2.min.js
哇克里斯,乌尔惊人.... IT WORKS !!!!每当我刷新页面时,所有的评论都丢失了。无论如何,使它们保持永久? – 2012-04-16 19:58:37
怎么样的投票;) – cfedermann 2012-04-16 20:32:53
有反正我可以存储在服务器上的HTML文件? – 2012-04-16 20:43:16