如何使用jquery将自定义css应用于textbox的title属性
我需要使用jquery在asp.NETMVC视图中将自定义css应用于textbox的title属性 谁能帮我获取一些示例代码,以便将自定义css应用于文本框的title属性 谢谢和问候, Santosh Kuamar Patro先生你可以用它来实现这一目标 HTML示例:如何使用jquery将自定义css应用于textbox的title属性,jquery,Jquery,我需要使用jquery在asp.NETMVC视图中将自定义css应用于textbox的title属性 谁能帮我获取一些示例代码,以便将自定义css应用于文本框的title属性 谢谢和问候, Santosh Kuamar Patro先生你可以用它来实现这一目标 HTML示例: <p> <label for="age">Age:</label> <input id="age" title="We ask for your age only
<p>
<label for="age">Age:</label>
<input id="age" title="We ask for your age only for statistical purposes." />
</p>
所需的JavaScript(用于激活工具提示):
不要忘记导入必要的脚本(以及所需的CSS主题):
浏览器控制默认标题属性弹出窗口的行为。您可以使用可自定义的工具提示覆盖此功能。因此。。你试过/考虑过吗?如果不合适,我应该删除答案。
.ui-tooltip {
background: green;
border: 2px solid white;
color: white;
}
$(function () {
$(document).tooltip();
});
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>