首页 > 代码库 > 百度在线手写板代码
百度在线手写板代码
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>百度在线手写板代码-php自学网</title>
<style>
#sx{color:#00C;text-decoration:underline;cursor:pointer;}
</style>
</head>
<body>
<form name="f" action="s">
<input type="text" name="wd" id="kw" maxlength="100">
<input type="submit" value=http://www.mamicode.com/"" id="su">
<span id="sx">手写</span>
</form>
<script>
var w = window,d = document,n = navigator,k = d.f.wd
if (w.attachEvent) {
w.attachEvent("onload", function() {k.focus();})
} else {
w.addEventListener(‘load‘, function() {k.focus()},true)
};
var hw = {};
hw.i = d.getElementById("sx");
var il = false;
if (/msie (\d+\.\d)/i.test(n.userAgent)) {
hw.i.setAttribute("unselectable", "on")
} else {
var sL = k.value.length;
k.selectionStart = sL;
k.selectionEnd = sL
}
hw.i.onclick = function(B) {
var B = B || w.event;
B.stopPropagation ? B.stopPropagation() : (B.cancelBubble = true);
if (d.selection && d.activeElement.id && d.activeElement.id == "kw") {
hw.hasF = 1
} else {
if (!d.selection) {
hw.hasF = 1
}
}
if (!il) {
var A = d.createElement("script");
A.setAttribute("src", "http://www.baidu.com/hw/hwInput.js");
d.getElementsByTagName("head")[0].appendChild(A);
il = true;
}
};
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>百度在线手写板代码-php自学网</title>
<style>
#sx{color:#00C;text-decoration:underline;cursor:pointer;}
</style>
</head>
<body>
<form name="f" action="s">
<input type="text" name="wd" id="kw" maxlength="100">
<input type="submit" value=http://www.mamicode.com/"" id="su">
<span id="sx">手写</span>
</form>
<script>
var w = window,d = document,n = navigator,k = d.f.wd
if (w.attachEvent) {
w.attachEvent("onload", function() {k.focus();})
} else {
w.addEventListener(‘load‘, function() {k.focus()},true)
};
var hw = {};
hw.i = d.getElementById("sx");
var il = false;
if (/msie (\d+\.\d)/i.test(n.userAgent)) {
hw.i.setAttribute("unselectable", "on")
} else {
var sL = k.value.length;
k.selectionStart = sL;
k.selectionEnd = sL
}
hw.i.onclick = function(B) {
var B = B || w.event;
B.stopPropagation ? B.stopPropagation() : (B.cancelBubble = true);
if (d.selection && d.activeElement.id && d.activeElement.id == "kw") {
hw.hasF = 1
} else {
if (!d.selection) {
hw.hasF = 1
}
}
if (!il) {
var A = d.createElement("script");
A.setAttribute("src", "http://www.baidu.com/hw/hwInput.js");
d.getElementsByTagName("head")[0].appendChild(A);
il = true;
}
};
</script>
</body>
</html>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。