html页面上有一个链接,其中包含以下文字
<Html>
...
<script type="text/JavaScript">
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function hide() {
createCookie("ABC","1","7");
document.location='abc.php';
}
</script>
<a style="color:#000;" rel="nofollow" href="abc.php?x=1" onclick="hide();return false;">My Link</a>
...
如何使用Java模拟html“My Link”点击?