我如何通过使用JavaScript插入一个文本框 [英] How Can I insert a text box by using the Javascript

查看:175
本文介绍了我如何通过使用JavaScript插入一个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是新的ASPX,我在开发code的一个问题。请参考下面。如何设置文本框旁边的删除按钮?

  testTypeNode.Text = testTypeNode.Text&安培; 与& _
                    < IMG SRC =../图像/ delete_16x.ico与& _
                    风格=文本对齐:底部;光标:指针;ALT =删除TestType与& _
                    标题=删除TestType的onclick =的javascript:如果(确认()''输入code here`Are您确定要删除所有运行测试将被中止?!')&放大器; _
                    {&放大器; ClientScript.GetPostBackEventReference(btnDeleteTestType,与& sequenceNode.Value.ToString&放大器; _
                    WordSeparationChar&安培; testTypeNode.Value.ToString&安培; )及;};/>中


解决方案

答案是:

  testTypeNode.Text = testTypeNode.Text&安培; 与& _
                                                            < IMG SRC =../图像/ delete_16x.ico与& _
                                                            风格=文本对齐:底部;光标:指针;ALT =删除TestType与& _
                                                            标题=删除TestType的onclick =的javascript:如果(确认(你确定要删除所有运行测试将被中止?!'))&放大器; _
                                                            {&放大器; ClientScript.GetPostBackEventReference(btnDeleteTestType,与& sequenceNode.Value.ToString&放大器; _
                                                            WordSeparationChar&安培; testTypeNode.Value.ToString&安培; )及;};/>中&安培; _
                                                            <输入类型=文字ID =txtExperimentalStressdaysNAME =ExperimentalStressdays大小=5的标题=请输入实验Stressdays的onclick =JavaScript的:则IsNumeric( )/>中

Am new for the ASPX, I have a problem in developing the code. Please see below. How Can i set a text box beside to delete button?

testTypeNode.Text = testTypeNode.Text & "" & _
                    " <img src=""../images/delete_16x.ico""" & _
                    " style=""text-align:bottom; cursor:pointer;"" alt=""Delete TestType""" & _
                    " title=""Delete TestType"" onclick=""javascript:if(confirm('`enter code here`Are you sure you want to delete? Any running tests will be aborted!'))" & _
                    " {" & ClientScript.GetPostBackEventReference(btnDeleteTestType, "" & sequenceNode.Value.ToString & _
                    WordSeparationChar & testTypeNode.Value.ToString & "") & ";};"" />"

解决方案

Answer is:

testTypeNode.Text = testTypeNode.Text & "" & _
                                                            " <img src=""../images/delete_16x.ico""" & _
                                                            " style=""text-align:bottom; cursor:pointer;"" alt=""Delete TestType""" & _
                                                            " title=""Delete TestType"" onclick=""javascript:if(confirm('Are you sure you want to delete? Any running tests will be aborted!'))" & _
                                                            " {" & ClientScript.GetPostBackEventReference(btnDeleteTestType, "" & sequenceNode.Value.ToString & _
                                                            WordSeparationChar & testTypeNode.Value.ToString & "") & ";};"" />" & _
                                                            " <input type = ""text"" id = ""txtExperimentalStressdays"" name =""ExperimentalStressdays"" size = ""5"" title=""Please enter the Experimental Stressdays"" onclick="javascript:IsNumeric()/>"

这篇关于我如何通过使用JavaScript插入一个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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