我有一个django模型,其中包括几个只读的textareas和文本。例如:
class FormTask(forms.Form):
name = forms.CharField(required = False, max_length = 300,
widget = forms.TextInput(attrs = {"readonly" : "readonly"}),
label = "task name")
id = forms.CharField(required = False, max_length = 300,
widget = forms.TextInput(attrs = {"readonly" : "readonly"}),
label = "task ID")
script = forms.CharField(required = False, max_length = 2000,
widget = forms.Textarea(attrs = {"readonly" : "readonly"}),
label = "task script")
当我使用jquery将模型渲染到html页面时,我发现textarea(脚本)无法填充命令,而且这个textarea是readonly,所以我想动态地改变它的大小。如果我想改变它的尺寸,你能告诉我该怎么办吗?非常感谢你!