当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM acceptCharset属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM acceptCharset属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 376 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The acceptCharset property sets or returns a comma separated list of possible character-sets for the form data.
acceptCharset 属性可设置或返回表单数据中character-sets的值,每个以逗号为分隔

Syntax
语法

formObject.acceptCharset=charset


Example
举例

The following example alerts the possible character-set for the form data:
下面的举例将提示表单数据的character-set的值:

<html>
<head>
<script type="text/javascript">
function showCharset()
{
var x=document.getElementById("myForm")
alert(x.acceptCharset)
}
</script>
</head>
<body>
<form id="myForm" acceptCharset="ISO-8859-1">
Text: <input type="text" value="Hello World!">
<input type="button" onclick="showCharset()"
value="Show charset">
</form>
</body>
</html>


演练

Get the possible character-sets for the form data

评论 (0) All

登陆 | 还没注册?