2015-06-24 67 views

回答

2
<script type="text/javascript"> 

$(function(){ 
    @if(Model.IsModalShown) 
    { 
     <text>$('#myModal').modal('show');</text> 
    } 
}); 

</script> 

OR

<script type="text/javascript"> 

$(function(){ 
    if('@Model.IsModalShown' == 'True') 
    { 
     $('#myModal').modal('show'); 
    } 
}); 

</script>