似乎Jquery代码无法识别asp.net网页中可用的TextBox [英] Seems Jquery code not recognizing TextBox available inside asp.net webpage
本文介绍了似乎Jquery代码无法识别asp.net网页中可用的TextBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是设计视图代码
This is The Design View Code
<div style="border:2px solid white;height:400px;width:155%;margin-left:-530px;margin-top:-40px;border-radius:15px;">
<table style="width: 350px">
<tr>
<td class="auto-style16" rowspan="6">
</td>
<td class="auto-style17">Member's login</td>
</tr>
<tr>
<td class="auto-style19">
User Name</td>
</tr>
<tr>
<td class="auto-style21">
<asp:TextBox ID="TextBox1" runat="server" CssClass="textEntry" Height="25px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Password</td>
</tr>
<tr>
<td class="auto-style23">
<asp:TextBox ID="TextBox2" runat="server" CssClass="textEntry" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style15">
<asp:Button ID="btnLogin" runat="server" Text="Sign in" Width="79px" OnClick="btnLogin_Click" />
</td>
</tr>
<tr>
<td class="auto-style9" colspan="2"><asp:Label ID="lblMessage" runat="server" /></td>
</tr>
<tr>
<td class="auto-style9" colspan="2"> </td>
</tr>
<tr>
<td class="auto-style9" colspan="2">* In case of Sign in problem must contact system admin</td>
</tr>
</table>
</div>
我正在尝试Jquery Code是
I am trying Jquery Code is
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
$('#TextBox1').width(150);
$('#TextBox1').focus(function () {
$(this).animate({
width: 250,
height: 20
})
.delay(100)
});
$('#TextBox1').blur(function () {
$(this).animate({
width: 150,
height: 15
})
.delay(100)
});
});
</script>
当我运行我的页面时,它正常显示当我点击文本框时它没有显示动画
我感谢任何帮助...
谢谢..
问候:Anjanee
When I m running my page it's show normally when i am clicking in textbox it's not showing animation
Any help i appreciate...
Thank you..
Regards: Anjanee
推荐答案
(document).ready(function(){
(document).ready(function () {
('#TextBox1')。width(150);
('#TextBox1').width(150);
('#TextBox1')。focus(function(){
('#TextBox1').focus(function () {
这篇关于似乎Jquery代码无法识别asp.net网页中可用的TextBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文