<%@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熱心網友回復:
選擇器::contains(text)
用法示例:
$(":contains('W3School')")
解釋:
包含指定字串的所有元素
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/76336.html
標籤:ASP.NET
