<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題檔案</title>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<style type="text/css">
#o {
background-color: #0F0;
}
</style>
</head>
<body>
<div class="o" id="o">
1
</div>
<div class="o" id="o">
我
</div>
<script>
$(".o").text("我").hide(".o");
</script>
uj5u.com熱心網友回復:
$(".o").each(function() {
if ($(this).text() == "我") {
$(this).hide();
}
});
你現在這個資料有空格如果要去掉的話還要加trimRight()
$(this).text().trimRight();
uj5u.com熱心網友回復:
謝謝謝謝謝謝uj5u.com熱心網友回復:
還是不行!!!uj5u.com熱心網友回復:
當DIV里出現指定值就把DIV隱藏uj5u.com熱心網友回復:
$('div.o:contains("指定的值")').hide();
uj5u.com熱心網友回復:
非常感謝??轉載請註明出處,本文鏈接:https://www.uj5u.com/net/76338.html
標籤:ASP.NET
