如何在asp.net中将功能值分配给文本框 [英] how to assign function value to textbox in asp.net

查看:77
本文介绍了如何在asp.net中将功能值分配给文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为文本框文本(如
)分配一个Java脚本函数返回值 textbox1.text="javascript:return add()";但它不能正常工作,请发送正确的方法
在此先感谢

i want to assign one java script function return value to a textbox text like
textbox1.text="javascript:return add()"; but it is not work can please send proper way
thanks in advance

推荐答案

您的问题不清楚,仍然只是一个线索-
您可以在脚本中使用它:
Your question is not clear, still just a clue -
You can use this in script:
document.getElementByID(''textbox1'').Value = add();


add()函数内部仅分配以下内容,
Inside the add() function only assign the like below,
document.getElementByID(''textbox1'').value = x



x-您要在文本框中显示的值.



x - the value you want to display in textbox.


同意Prera​​k.问题不是很清楚.
Agree with Prerak. Question is not very clear.
document.getElementByID(''<%= textbox1.ClientID %>'').Value = add();


这篇关于如何在asp.net中将功能值分配给文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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