需要HTML中的一些更改

时间:2014-12-30 08:01:29

标签: jquery

我有一个从页面获取HTML的函数我想在HTML中进行动态更改。

var html;

html = utility.getTabHtml(id);

现在我要删除<div id="test"> </div>中的所有内容,并希望添加<div class='modal-dialog modal-dialog-lg'> <div class='modal-content '>

以下是我的HTML。

<div class="mainScrollPan" id="mainScrollPan">
    <button type="button" class="btn btn-success btn-sm" onclick="Admin_Provider.ProviderAdd();"><i class="fa fa-plus-circle"></i> Add</button>
    <div class="spacer10"></div>
    <div class="clearfix"></div>
    <section class="panel panel-featured">
        <div id="test">
            <header class="panel-heading">
                <div class="panel-actions">
                    <a href="#" class="fa fa-times pull-right moveRT" onclick="Admin_Provider.UnLoadTab();"></a>
                </div>
                <h2 class="panel-title">Search Provider </h2> </header>
        </div>
        <div class="panel-body" id="pnlProvider_Search">
            <form class="form-bordered" onsubmit="return false" method="post">
                <!--start - CONTENTS-->
                <div class="form-group">
                    <div class="col-md-3">
                        <label class="control-label">Short Name</label>
                        <input class="form-control" id="txtShortName" type="text" maxlength="10" /> </div>
                    <div class="col-md-3">
                        <label class="control-label">First Name</label>
                        <input class="form-control" id="txtFirstName" type="text" maxlength="35" /> </div>
                    <div class="col-md-3">
                        <label class="control-label">Last Name</label>
                        <input class="form-control" id="txtLastName" type="text" maxlength="60" /> </div>
                    <div class="col-md-2">
                        <label class="control-label">Speciality</label>
                        <select id="ddlSpeciality" class="form-control" ddlist="GetSpecialty"></select>
                    </div>
                    <div class="col-md-3">
                        <label class="control-label">NPI</label>
                        <input class="form-control" id="txtNPI" type="text" placeholder="9999999999" data-mask="9999999999" /> </div>
                    <div class="col-md-3">
                        <label class="control-label">Entity</label>
                        <select id="ddlEntity" class="form-control" ddlist="GetEntity"></select>
                    </div>
                    <div class="col-md-2 pad-a-labelsize-btn">
                        <div class="btn-block">
                            <button class="btn btn-primary btn-sm" id="btnProviderSearch" type="submit" onclick="Admin_Provider.ProviderSearch();">Search</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </section>
</div>

0 个答案:

没有答案