java 字符串的拼接
发布网友
发布时间:2022-04-20 14:42
我来回答
共3个回答
热心网友
时间:2023-04-29 06:37
public static void main(String[] args) throws Exception {
String output="<input id=\"receivePersonId\" size=12 class=\"easyui-combobox\" name=\"\"\n"+
"\tdata-options=\"\n"+
"\t\teditable:false,\n"+
"\t\turl:'getFileUser.action',\n"+
"\t\tmethod:'get',\n"+
"\t\tvalueField:'user_id',\n"+
"\t\ttextField:'user_text',\n"+
"\t\tpanelHeight:'auto',\n"+
"\t\twidth:150,\n"+
"\t\tvalue:'请选择'\n"+"\t\"/>\n";
System.out.println(output);
}
热心网友
时间:2023-04-29 06:37
单引号套双引号(在套单引号)
热心网友
时间:2023-04-29 06:38
String test="<input id=\"receivePersonId\" size=12 class=\"easyui-combobox\" name=\"\"
data-options=\"
editable:false,
url:'getFileUser.action',
method:'get',
valueField:'user_id',
textField:'user_text',
panelHeight:'auto',
width:150,
value:'请选择'
\"/>";
单引号不用管,双引号要用\