如何隐藏div并在MVC中显示另一个div [英] How to hide on div and show another div in MVC
本文介绍了如何隐藏div并在MVC中显示另一个div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< script type =text / javascript>
$(function(){
tinymce.init({
// mode:specific_textareas,
selector:'#mytextarea'
// skin:'红色'
});
});
$(#btnUpdate)。click(function(){
alert(button); //删除此行,如果它工作
$(#tblMain)。隐藏();
$(#tblMainAlt)。show();
});
< / script>
< pre > < div id = tblMain 类 = tableSpaced 样式 = width:auto; height :100%;保证金左:25px; >
< div id =tblMainAltclass =tableSpacedstyle =width:auto; height:100%; margin-left:25px;>
< input id =btnUpdatetype =submitvalue =Updateclass =html-button onclick =location.href ='@ Url.Action(UpdateEmailTemplate,EmailTemplate);'/>
我尝试了什么:
我试过
$(#btnUpdate)。click(function(){
alert(button); //删除此行,如果它工作
$(#tblMain)。hide() ;
$(#tblMainAlt)。show();
});
解决方案
(功能(){
tinymce.init({
// mode:specific_textareas,
selector:'#mytextarea'
// skin:'red'
} );
});
(#btnUpdate)。click(function(){
alert(button); //删除此行如果有效
( #tblMain)隐藏();
<script type="text/javascript"> $(function () { tinymce.init({ //mode: "specific_textareas", selector: '#mytextarea' //skin: 'red' }); }); $("#btnUpdate").click(function () { alert("button"); // Remove this line if it worked $("#tblMain").hide(); $("#tblMainAlt").show(); }); </script>
<pre> <div id="tblMain" class="tableSpaced" style="width:auto;height:100%;margin-left:25px;">
<div id="tblMainAlt" class="tableSpaced" style="width:auto;height:100%;margin-left:25px;">
<input id="btnUpdate" type="submit" value="Update" class="html-button" onclick="location.href= '@Url.Action("UpdateEmailTemplate", "EmailTemplate");'" />
What I have tried:
I tried
$("#btnUpdate").click(function () { alert("button"); // Remove this line if it worked $("#tblMain").hide(); $("#tblMainAlt").show(); });
解决方案
(function () { tinymce.init({ //mode: "specific_textareas", selector: '#mytextarea' //skin: 'red' }); });
("#btnUpdate").click(function () { alert("button"); // Remove this line if it worked
("#tblMain").hide();
这篇关于如何隐藏div并在MVC中显示另一个div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文