Alpaca FormjQuery 表单插件

联合创作 · 2023-10-02 10:59

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>
浏览 3
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报