
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8">
<link rel="stylesheet" type="text/css" href="test.css">
<title>无标题 1</title>
</head>
----------------------------------------------------------------------------------------------
在<head></head>标签之间加入
<link rel="stylesheet" type="text/css" href="test.css">
"test.css"就是你的文件,这里填路径
package testpublic class JButtonTest
{
public static void main ( String[] args )
{
String regex = "(?i)(\\<img)([^\\>]+\\>)"
String input = "<img src=\"\" alt=\"\" >"
input = input.replaceAll (regex, "$1 style=\"width:500pxheight:400px\"$2")
System.out.println (input)
}
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)