嗨,我有2张卡(引导程序),我想点击案件信息,我会在第二张卡上显示一些文字 第一张卡:
<div class="col-lg-12 col-md-4">
<div class="card">
<div class="card-header">
<h4 class="card-title">Cases Infos</h4>
<p class="category">Parent - Child</p>
</div>
</div>
</div>
第二张卡片:
<div class="col-lg-12 col-md-4">
<div class="card">
<div class="card-header">
<p> text text </p>
</div>
</div>
</div>
答案 0 :(得分:0)
document.getElementById("asd").addEventListener('click',showData);
function showData(){
document.getElementById("data").innerHTML="New Data"
}
<div class="col-lg-12 col-md-4">
<div class="card">
<div class="card-header">
<p id="asd"> Show Case</p>
</div>
</div>
</div>
<div class="col-lg-12 col-md-4">
<div class="card">
<div class="card-header">
<p id="data"> text text </p>
</div>
</div>
</div>