我有几个 HTML 表隐藏在手风琴面板中,我需要搜索所有表才能找到一行,我是否错过了部署相应面板并突出显示相应行的内容?
这是我的代码:
function testSearch(){
console.log("testresearch")
let input = document.getElementById('searchbar').value
input=input.toLowerCase();
let x = document.getElementsByClassName('panel');
for (i = 0; i < x.length; i++) {
if (!x[i].innerHTML.toLowerCase().includes(input)) {
x[i].style.display="none";
}
else {
x[i].style.display="list-item";
}
}
}Run Code Online (Sandbox Code Playgroud)
<input
id="searchbar"
onkeyup="testSearch()"
type="text"
name="search"
placeholder="..."
/><br />
<button class="accordion button is-light">A</button>
<div class="panel" style="">
<table class="dataframe table is-hoverable is-fullwidth clickable-table">
<tbody>
<tr>
<td>A</td>
<td>A</td>
<td>A</td>
</tr>
</tbody>
</table>
</div>
<button class="accordion button is-light">B</button>
<div class="panel" style="">
<table class="dataframe table is-hoverable is-fullwidth clickable-table">
<tbody> …Run Code Online (Sandbox Code Playgroud)我从android studio开始,我看不到元素(Buttons,TextView,..)我在页面中的设计页面中拖放activity_main.xml.这些元素存在于我的XML文件中,当我在我的设备上运行我的应用程序时,我可以看到它们,但我不知道如何在"设计和蓝图"页面上看到它们.
谢谢你的帮助.
这是我的xml代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:layout_editor_absoluteY="25dp">
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_home"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/navigation" />
<Button
android:id="@+id/button"
android:layout_width="12dp"
android:layout_height="12dp"
android:text="ClickMe"
tools:layout_editor_absoluteX="-73dp"
tools:layout_editor_absoluteY="29dp" />
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="20dp" />
</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)
我的画布完全是空的.
编辑:
我有2个错误:
渲染问题: Failed to find style 'bottomNavigationStyle' in current theme Tip: Try to refresh the layout.
ConstraintLayout中缺少约束:
This view is not constrained. It …