程式碼示例:
$(document).ready(function(){
$("#ceshia").mouseover(function(){
var underline=$("#underline").val();
if(underline==1 ||underline==2) {
var xia="underline";
}
else {
var xia="none";
var hover=$("#hover").val();
$("#ceshia:hover").css({
"color":hover,"text-decoration":xia
);
$("#ceshia").mouseout(function(){
if(underline==0 ||underline==2) {
var links=$("#link").val();
$("#ceshia:link").css({
"color":links,"text-decoration":xia
$("#ceshia").mousedown(function(){
var active=$("#visited").val();
$("#ceshia:active").css({
"color":active,"text-decoration":xia
程式碼示例:
$(document).ready(function(){
$("#ceshia").mouseover(function(){
var underline=$("#underline").val();
if(underline==1 ||underline==2) {
var xia="underline";
}
else {
var xia="none";
}
var hover=$("#hover").val();
$("#ceshia:hover").css({
"color":hover,"text-decoration":xia
}
);
}
);
$("#ceshia").mouseout(function(){
var underline=$("#underline").val();
if(underline==0 ||underline==2) {
var xia="none";
}
else {
var xia="underline";
}
var links=$("#link").val();
$("#ceshia:link").css({
"color":links,"text-decoration":xia
}
);
}
);
$("#ceshia").mousedown(function(){
var underline=$("#underline").val();
if(underline==0 ||underline==2) {
var xia="none";
}
else {
var xia="underline";
}
var active=$("#visited").val();
$("#ceshia:active").css({
"color":active,"text-decoration":xia
}
);
}
);
}
);