I will share with you some little things I learned today.
Similar to TreeMenu control.
Direct code without nonsense:
<script language="javascript">
function control() {//Define function
if ( == "+") {//Judge expansion status
= "block";//If it is the "+" sign, you can expand it
= "-";//It is displayed as a minus sign after expansion
}
else {
= "none";//If it is "-" sign, it cannot be expanded
= "+";//The symbol changes after clicking.
}
}
</script>
Html code:
//There is nothing to say about this code. The main thing is that the Id corresponds to the Id in the js code.
<body>
<span style=" border:1px solid #00000; color:Blue;cursor:hand ;" onclick="control()">-</span>No website status<br/>
<ul >
<li><a href="" target="_blank">Baidu</a> </li>
<li><a href="" target="_parent">Baidu</a></li>
<li><a href="" target="_blank">or Baidu</a></li>
</ul>
</body>
Similar to TreeMenu control.
Direct code without nonsense:
Copy the codeThe code is as follows:
<script language="javascript">
function control() {//Define function
if ( == "+") {//Judge expansion status
= "block";//If it is the "+" sign, you can expand it
= "-";//It is displayed as a minus sign after expansion
}
else {
= "none";//If it is "-" sign, it cannot be expanded
= "+";//The symbol changes after clicking.
}
}
</script>
Html code:
//There is nothing to say about this code. The main thing is that the Id corresponds to the Id in the js code.
Copy the codeThe code is as follows:
<body>
<span style=" border:1px solid #00000; color:Blue;cursor:hand ;" onclick="control()">-</span>No website status<br/>
<ul >
<li><a href="" target="_blank">Baidu</a> </li>
<li><a href="" target="_parent">Baidu</a></li>
<li><a href="" target="_blank">or Baidu</a></li>
</ul>
</body>