我有这个网站结构:
第一页:
<script src="../jquery.uniform.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
$("input, textarea, select, button").uniform();
$("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random());
});
</script>
<link rel="stylesheet" href="../css/uniform.default.css" type="text/css" media="screen">
</head>
<body>
In first page:<br/>
<select>
<option>Through Google</option>
<option>Through Twitter</option>
<option>Other…</option>
</select>
<div id = "show_image_error">load file ...</div>
adv_dell_img_err.html文件:
File 2
//get data from DB ...
<select>
<option>Through Google</option>
<option>Through Twitter</option>
<option>Other…</option>
</select>
为什么adv_dell_img_err.html中的制服不起作用?如何修复它们?
由于
答案 0 :(得分:1)
尝试更改此内容:
$(function(){
$("input, textarea, select, button").uniform();
$("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random());
});
到此:
$(function(){
$("#show_image_error").load(
"adv_dell_img_err.html?id="+ Math.random(),
function(responseText, textStatus, XMLHttpRequest) {
$("input, textarea, select, button").uniform();
}
);
});
我认为问题在于,当统一执行时,内容尚未加载。