我正在尝试在我的 javascript 代码中设置表单的 html 属性。除了 backgroundColor 属性外,所有属性似乎都很好地传递到网页(即宽度和高度)。
jQuery(function () {
jQuery("#dialog-form1").dialog({
autoOpen: false,
height: 250,
width: 400,
backgroundColor: #e74c3c,
modal: true,
buttons: {},
//close: function() {}
有什么想法吗?
谢谢,
标记
最佳答案
#e74c3c
是无效的 javascript...它应该在引号中。
替换...
backgroundColor: #e74c3c,
与...
backgroundColor: "#e74c3c",
关于javascript - 使用 Javascript 定义表单的 html 属性,backgroundColor 属性不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22270873/