本文介绍了在javascript上添加字符串列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我真的不知道怎么问这个。但谁能告诉我怎么做?
例子..
textbox.TEXT = 1,2,3用户输入..
HTML:
I really dont know how to ask this. but can anyone tell me how to do this?
example..
textbox.TEXT = "1,2,3" user inputted..
HTML:
<script>
function myFunction() {
var r = confirm("Numbers: " + textbox.TEXT );
if (r == true) {
document.getElementById('<%=hdnsubmit.ClientID%>').value = r;
} else {
document.getElementById('<%=hdnsubmit.ClientID%>').value = r;
}
}
</script>
这样它就会显示出来,数字:1,2,3
so that it'll show that, "Numbers: 1,2,3 "
推荐答案
<script>
function myFunction() {
var Txt = document.getElementById("textbox").value;
var r=confirm("Numbers: " + Txt);
document.getElementById('<%=hdnsubmit.ClientID%>').value=r;
}
</script>
问候..
Regards..
<script>
function myFunction() {
var r = confirm("Numbers: " +
这篇关于在javascript上添加字符串列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!