在jquery插件成功的情况下,我需要操作DOM并创建/显示一些新的html控件......
HTML ..
<input type="file" name="fileupload" id="fileupload" />
<%=Html.ActionLink("TestA", "TestA", "ControllerA", new { Id = Id})%>
<%=Ajax.ActionLink("TestB","TestB","ControllerB", new { Id= Id})%>
JS:
<script type="text/javascript">
$(function () {
$('#fileupload').uploadify({
'buttonText': 'Upload',
'auto': true,
'multi': false,
'swf': '/Uploadify/uploadify.swf',
'uploader': '/ControllerA/LinkMethod',
'formData': { 'Id': Id},
'debug': false,
'onUploadSuccess': function (file, data, response) {
//Here I want to show two action links and disable/invisible the plugin.
}
});
});
答案 0 :(得分:3)
只需为具有相应ID值的相应元素调用show()
和hide()
。
'onUploadSuccess': function (file, data, response) {
$('#MyIdForLink1').show();
$('#MyIdForLink2').show();
$('#pluginId').hide();
}