hi I use below code to show watermark in textbox:
<script type="text/javascript">
window.onload = function SetColorOnPageLoad() {
var defalutNameText = "از";
var defalutTellText = "تا";
var defalutsearch = "جستجو بر اساس کد ملک";
functionSetColor(document.getElementById("Txtsearch"), defalutsearch);
functionSetColor(document.getElementById("Txtejare1"), defalutNameText);
functionSetColor(document.getElementById("Txtejare2"), defalutTellText);
functionSetColor(document.getElementById("Txtrahn1"), defalutNameText);
functionSetColor(document.getElementById("Txtrahn2"), defalutTellText);
}
function functionSetColor(Textbox, WaterMark) {
if (Textbox.value.length > 0 && Textbox.value == WaterMark) {
Textbox.style.color = "#b1b1b1";
} else {
Textbox.style.color = "black";
}
}
function WaterMark(txt, evt, msg) {
if (txt.value.length == 0 && evt.type == "blur") {
txt.style.color = "#b1b1b1";
txt.value = msg;
}
if (txt.value == msg && evt.type == "focus") {
txt.style.color = "black";
txt.value = "";
}
}
</script>
here I want define different font size for water mark...
I want watermark font-size:14px
but when users want type into textbox font-size=16px
how I can do it?
best regards
neda