1樓:精製骨架
private sub command1_click()dim a() as string
dim b() as string
dim i as long
dim j as long
dim isfind as booleana = split(text1.text, ",")b = split(text2.text, ",")while i < ubound(a)
isfind = false
for j = 0 to ubound(b)if a(i) = b(j) then
isfind = true
exit for
end if
next
if isfind then
for j = i to ubound(a) - 1a(j) = a(j + 1)
next
redim preserve a(ubound(a) - 1)else
i = i + 1
end if
wend
text1.text = ""
for i = 0 to ubound(a)if len(text1.text) > 0 thentext1.text = text1.text & "," & a(i)
else
text1.text = a(i)
end if
next
text2.text = ""
end sub
2樓:匿名使用者
sub command1_click()
dim str1 as string, str2 as stringstr1 = txt1
str2 = txt2
str1 = replace(str1, str2, "")txt1 = str1
txt2 = ""
end sub
3樓:
順序一致:txt1.text.replace(txt2.text,"")
即可把txt1與txt2中相同的字刪除掉
不一致:
string strsplit=txt1.text.split(',');
string strsplit2=txt1.text.split(',');
for (int i=0;i 4樓:匿名使用者 replace(form1.txt1.value,form1.txt2.value,"") 方法很多,是純用js的。不過如果你用伺服器控制項的話,id那裡還得稍微改一改。var t1 document.getelementbyid this.text1.clientid value 方法2,用updatepanel,首先設定textbox.autopostback true。在後台 觸發的... jquery 獲取輸入的值,用jquery中的 class html class value php操作txt文字,乙個文字框,乙個提交按鈕,點選提交按鈕之後,把這個文字框的內容寫進data 30 很簡單,使用file put contents 函式 if isset get name 如果是pos... 這道題有許多種演算法。我說其中兩種演算法吧。演算法一 設框裡有a個雞蛋。a,b,c,d,e都是正整數。1 2個2個拿還剩1個。證明是奇數。則a 2a 1 2 9個9個拿正好拿完。證明是9的倍數,再加上 1 的條件。則a 2a 1 9 3 5個5個拿還剩4個。證明這個數就是5的偶數倍數加1的得數,再乘...C如何將兩個文字框中輸入的數字相加後即時發應在文字框裡
php中在文字框輸入內容旁邊有按鈕點選後替換當前
一框雞蛋,拿正好拿完。兩個兩個拿,還剩。拿正