如何使用Javascript插入文本框
我是ASPX的新手,在开发代码时遇到了问题。请看下面。如何在“删除”按钮旁边设置文本框如何使用Javascript插入文本框,javascript,asp.net,textbox,Javascript,Asp.net,Textbox,我是ASPX的新手,在开发代码时遇到了问题。请看下面。如何在“删除”按钮旁边设置文本框 testTypeNode.Text = testTypeNode.Text & "" & _ " <img src=""../images/delete_16x.ico""" & _ " style=""text-align:bottom; cursor:pointer;"" alt=""Delete
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 & "") & ";};"" />"
答案是:
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()/>"
您希望在回发到服务器或客户端时发生这种情况吗?您只是想在“删除”按钮旁边获得一个文本框吗?很抱歉语言不通,请继续回答上面的另一个问题。如何设置上述文本框id=txtExperimentalStressdays的可见性条件。我希望通过使用此条件来隐藏,就像testdata='Yes'然后txtExperimentalStressdays.visible=true否则txtExperimentalStressdays.visible=false结束如果上述代码不允许我执行此类任务,请帮助。上述代码面临的第二个问题是:如何验证txtExperimentalStressdays数据的有效性数字与否?请帮忙