我想建立一個網站,將從fontbit(一個希伯來語字體公司)下載字體。 這裏我所做的:HTML和JS的形式,不工作
<!DOCTYPE html>
<html>
<head>
<title>הורדת פונטים מפונטביט בחינם</title>
</head>
<body align="center">
<form name="form" onsubmit="return downloadFont()" method="post">
<span dir="rtl" align="center">שם הפונט באנגלית:</span><br>
<input type="text" name="name"><br><br>
<input align="left" type="radio" name="fonttype" value="regular">Regular<br>
<input align="left" type="radio" name="fonttype" value="bold">Bold<br><br>
<input type="submit" value="download">
</form>
<script>
function downloadFont() {
var fontName = document.form["form"]["name"].value;
var fontType= document.form["form"]["fonttype"].value;
function bold() {
var url = "http://fontface.co.il/fonts/"+fontName+"boldwebfont.eot";
window.location=url;
}
function regular() {
var url = "http://fontface.co.il/fonts/"+fontName+"regularwebfont.eot";
window.location=url;
}
if (fontType == regular) {
regular();
}
if (fontType==bold) {
bold();
}
else {
alert("error");
}
}
</script>
</body>
</html>
林初學,所以也許我做了一個巨大的錯誤, 的問題是,當我點擊下載中心應該帶我去的URL。 但它什麼都不做。 (希伯來語文本是「英文字體mame:」)
函數bold()的結果 - HTTP錯誤404.0 - 未找到 您正在查找的資源已被刪除,名稱已更改或暫時不可用。 – Wordica
這是什麼意思?我是一個總的初學者 –
這些是受版權保護的字體,你需要有一個許可證,標題說「從字體位下載免費字體」的事實可能是非法使用 –