Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
290 views
in Technique[技术] by (71.8m points)

django 手动/自动 添加多行表单

类似这种格式的多行表单

1 / first_name / last_name / age / <按钮添加一行>
2 / first_name / last_name / age / <按钮添加一行>


上面那个按钮是不是要自己用js代码来添加,还是forms的代码里就有设定了。

django新手,没有系统学过。请指明拜一下


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

我了解到的是通过jquery,然后使用$("xxdiv").add(newForm)这种,通过再写一次<div>form.astable()</div>这样,你可以上网搜一下其他写法或者使用我给你的.(如果搜到其他的,也请告知一下,蟹啦)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...