kk_lee69 发表于 2011-9-17 21:34:59

[已解決]字串符中 如果有特殊保留字元 怎麼處理 例如: ;分號 或者" 這個符號

本帖最后由 kk_lee69 于 2011-9-18 00:55 编辑

字串符中 如果有特殊保留字元 怎麼處理 例如: ;分號 或者" 這個符號

$A= "<th style="min-height: 24px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 16px; font-size: 13px; font-family: MingLiU, 'Arial Unicode MS'; vertical-align: bottom; overflow: hidden; width: 108px; color: #ffffff; text-align: left; text-decoration: none; border: 1px solid #cacad9; padding: 0px; background-color: #5175b9; background-repeat: no-repeat" scope="col">   "

這樣其實因為;號的問題就會出現問題了......

怎麼可以讓字串直接存入下面的值

<th style="min-height: 24px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 16px; font-size: 13px; font-family: MingLiU, 'Arial Unicode MS'; vertical-align: bottom; overflow: hidden; width: 108px; color: #ffffff; text-align: left; text-decoration: none; border: 1px solid #cacad9; padding: 0px; background-color: #5175b9; background-repeat: no-repeat" scope="col">

afan 发表于 2011-9-17 22:18:36

$Str = '<th style="min-height: 24px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 16px; font-size: 13px; font-family: MingLiU, ' & "'" & 'Arial Unicode MS' & "'" & '; vertical-align: bottom; overflow: hidden; width: 108px; color: #ffffff; text-align: left; text-decoration: none; border: 1px solid #cacad9; padding: 0px; background-color: #5175b9; background-repeat: no-repeat" scope="col">'
Msgbox(0, '', $Str)很久以前写的,可以参考下~
http://www.autoitx.com/thread-10929-1-1.html

kk_lee69 发表于 2011-9-18 00:55:15

感謝幫忙!!
页: [1]
查看完整版本: [已解決]字串符中 如果有特殊保留字元 怎麼處理 例如: ;分號 或者" 這個符號