How we can avoid the saving of watermark text of a textbox while saving? In my application, I have one textbox which has a watermark text like enter value(by using ajax textbox watermark extender). when i save the form, the text box returns the value of some white space corresponding the letters of the water mark text. And i used to trim(). but it is saving as old manner. Please help me for avoiding this one. thanks in advance..
2 に答える
1
jquery 透かしプラグインで使用されるアプローチに従うことができます。
プラグインはフォームの送信をリッスンし、送信を傍受し、透かしテキストのみを含む入力の値を空の文字列に設定してから、送信の続行を許可します。ms ajax でも同じことができます。
あなたがそれにオープンで、一般的に幸せな人になりたいなら、jqueryと透かしプラグインを追加するだけです. この問題を処理します。プラグインはここにあります。
于 2010-07-07T07:55:25.850 に答える
0
または、HTML5 プレースホルダー、またはそれを処理する jQuery ヒントを使用することもできます。
http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
于 2010-07-07T07:59:55.013 に答える