我正在尝试使用 Alpaca 生成可配置的表单。 我想按照这里显示的那样做:http://www.alpacajs.org/demos/bootstrap/customer-profile/create-simple-form.html (从 json 文件加载选项和模式)。 我写了以下简单的代码:
<body>
<div id="form"></div>
<script type="text/javascript">
$(document).ready(function() {
$("#form").alpaca({
"schemaSource": "path_to_my_schema/schema.json"
});
});
</script>
</body>
它看起来 super 简单,但它不起作用...我将不胜感激任何帮助!
最佳答案
如果它在同一目录中,只需“./schema.json”即可。
关于javascript - 羊驼表单 : loading schema and options from . json 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49655019/