经典的asp不承认空间角色

时间:2016-05-05 22:57:56

标签: html drop-down-menu asp-classic html-select response.write

真的这是一个2个问题的帖子,但我会总结一下......

  • 我无法在select语句的选项中识别空格。

CSS:> db.foo.find( { addresses : {$elemMatch : {"name":"home","state":"NY"}}}, { "_i d":0, "username" :1, "addresses" :1 }) { "username" : "kbanker", "addresses" : [ { "name" : "home", "state" : "NY" }, { "name" : "work", "state" : "NY" } ] }

这是我的代码:(想象一下我先写出选择)..这是选项

select{font-family: monospace;}

使用 for i = 0 to db-1 response.write "<option" if i = 0 then response.write " selected" end if response.write " value='" if db(i,3) = 1 and session("id") <> db(i,4) then Response.Write "-1" else Response.Write db(i,0) end if Response.Write "'> " 'Option Text, add ID dim optionText optionText = "(" & db(i,0) & ")" 'Make all Id's width equal so the text begins on the same vertical line 'Pad with spaces before text, padding for up to id = 99999 if len(optionText) < 7 then Do While len(optionText)<7 optionText = optionText & "REPLACE HERE" Loop end if 'Option Text, add Detail optionText = optionText + Trim(db(i,5)) 'Text if len(optionText) > 84 then Response.write left(optionText,81) & "..." else 'Pad Text to same length so all "locked" can be padded to the right if len(optionText) < 84 then Do While len(optionText)<84 optionText = optionText & "REPLACE HERE" Loop end if Response.Write optionText end if 'Locked Response.write " &#x1f512; admin &#x1f512;" next &nbsp;或仅&#160;替换上面2个地方的“替换此处”没有任何影响,该页面始终只考虑第一个空格。

在图片中,您将看到精确的衬垫。

  • 7 - (id)
  • 84 - 直至“锁定”符号
  • 的文本总长度

enter image description here

1 个答案:

答案 0 :(得分:1)

do while循环没有做你期望的事情;完成Liabilities 100,000 Capital 50,000 Shared Capital 50,000 Current Liability 50,000 Expense Payable 25,000 Other Payable 25,000 Payable 1 15,000 Payable 2 10,000 Assets 100,000 Fixed Assets 50,000 Furniture 50,000 Current Assets 50,000 Cast 25,000 Bank Balance 25,000 Bank 1 15,000 Bank 2 10,000 后,optionText = optionText & "&nbsp;"的长度超过7,并退出循环。您需要做的是在字符串中添加optionText个空格。

您可以使用for循环来执行此操作:

7-len(optionText)