Alpaca Form jQuery 表单插件 项目简介
Alpaca 是一个 jQuery 的表单插件,可以通过 JSON 格式数据直接即时生成 Web 表单。示例代码:<div id="form1"></div>
<script type="text/javascript">
$(function() {
$("#form1").alpaca({
"schema": {
"title": "User Feedback",
"description": "What do you think about Alpaca?",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"ranking": {
"type": "string",
"title": "Ranking",
"enum": ['excellent', 'not too shabby', 'alpaca built my hotrod']
}
}
}
});
});
</script>
<script type="text/javascript">
$(function() {
$("#form1").alpaca({
"schema": {
"title": "User Feedback",
"description": "What do you think about Alpaca?",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"ranking": {
"type": "string",
"title": "Ranking",
"enum": ['excellent', 'not too shabby', 'alpaca built my hotrod']
}
}
}
});
});
</script>