如何使文本框可见? [英] How to make textbox visiblity?

查看:94
本文介绍了如何使文本框可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是jquery概念的新手,在aspx页面编辑和取消我使用了jquery的概念,其功能正常。这个概念的编辑和删除一旦学生更新配置文件.....但第一次当他进入页面时,只有文本框应该在那里.pls为它提供解决方案。



jquery:

$(document).ready(function(){

$(#EditFirstName)。click(function(){

$( .ClassFirstName)。toggle(blind);

$(#txtFirstName)。val($(#lblFirstName)。text());

});

$(#CancelFirstName)。click(function(){

$(。ClassFirstName)。toggle(blind);

$(#txtFirstName)。val();

});



}) ;



apsx页面:



Hi,
I am new to jquery concept, in aspx page to edit and cancel i had used concept of jquery wherein the functionality works fine .this concept of edit and delete once the student had updated the profile..... but first time when he is entered to the page only textboxs should be there .pls provide a solution for it.

jquery:
$(document).ready(function () {
$("#EditFirstName").click(function () {
$(".ClassFirstName").toggle("blind");
$("#txtFirstName").val($("#lblFirstName").text());
});
$("#CancelFirstName").click(function () {
$(".ClassFirstName").toggle("blind");
$("#txtFirstName").val("");
});

});

apsx page:

<div style="margin: 10px">
                                <label>FirstName:</label>
                                <asp:Label ID="lblFirstName" ClientIDMode="Static" runat="server" Class="ClassFirstName"></asp:Label>
                                <asp:TextBox ID="txtFirstName" ClientIDMode="Static" Class="ClassFirstName" runat="server" MaxLength="20" Style="display: none;"></asp:TextBox>
                                <a href="#" class="ClassFirstName" id="EditFirstName">Edit</a><span>&nbsp;</span>
                                <a href="#" class="ClassFirstName" id="CancelFirstName" style="display: none">Cancel</a><span>&nbsp;</span>

                            </div>







我的问题在于页面加载我希望文本框可见吗?请为我找到解决方案。




my problem is on page load i want the textbox to be visibled ? pls do find the solution for me.

推荐答案

(document).ready(function(){
(document).ready(function () {


(#EditFirstName)。click(function(){
("#EditFirstName").click(function () {


(。ClassFirstName)。toggle(blind);
(".ClassFirstName").toggle("blind");


这篇关于如何使文本框可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆