如何在Bootstrap模式中使用Javascript函数

时间:2015-09-30 15:32:36

标签: javascript bootstrap-modal

这就是我尝试过的。它将显示对话框,但我想要的是在弹出窗口中显示Javascript函数的resullt,这是一个本地图形。



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Model</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>    <form id="form1" runat="server">

<div>               
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Open</button>
</div>           

            <!-- Modal -->
<div class="modal fade" id="myModal" role="form">
  <div class="modal-dialog">
    
      <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
        </div>
        <div class="modal-body">
          <p>Some text in the modal.</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
      
    </div>
  </div>
  
</div>
<script>
$('#myModal').on('shown.bs.modal', function Show_Click() 
{
Image.ImageUrl = "~/tmp/Linka.png?";
Image.Visible = true;
Corr.Visible = false;
Hide.Visible = true;
})
</script>
&#13;
&#13;
&#13;

任何人都可以帮助我吗?非常感谢。

0 个答案:

没有答案