高分请教HTC(IE5.0版)中的属性重载?虎虎虎~ 本身input就有value属性,可能是你再定义一个value有冲突,不过我没有试,你可以换个属性名字试一试。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try1.<html xmlns:IE><head><title>1231</title><style type="text/css">@media all { IE\:ValueTag { behavior:url(value.htc); }}</style></head><body> <IE:ValueTag id="ddd" value="12345"></IE:ValueTag> <button onclick="alert(ddd.value)">GetValue</button> <button onclick="ddd.value='111'">PutValue</button></body></html>2. value.htc:<public:component><public:property name="value" put="putValue" get="getValue"/><script language="javascript"> element.innerHTML = "<input type='text' id='xxx'>"; var sValue; function putValue(argValue) { sValue = argValue; window.document.getElementById('xxx').value = sValue; } function getValue() { sValue = window.document.getElementById('xxx').value; return sValue + "Len"; }</script></public:component> 难道没有从DOM结构方面取得Value的方法吗?我用debugger;中断后查看ddd,发现value那一栏中还是用户输入的值,是不是说明可以用什么方法取得这个值和对这个值赋值呢?因为我更想使用一个input在主页面中而不是用一个IE:\...。 I do not think you can overloading an existing property I do not think you can overload an existing property if you reuse a property like "value", how do you access the old property "value"? beginElement是什么意思? 如何用正则替换标点符号? 代码告急??? 有关jquery ui+jqgrid的一个问题 重分(>500)求问表格多表排序,如果不够可以再加,一旦实现另开新贴送分 关于复选框的问题!多谢! javascript门外汉求救!!! 两个简单问题,答题有分 <hr <%= HRStyle %>>怎么设置字体的粗体就可以,大小就不行? 表格中某一tr的分行行尾处理 请问大侠用JavaScript实现特殊二级菜单的方法 哪儿有javascript语法参考手册!!!!
1.
<html xmlns:IE>
<head><title>1231</title>
<style type="text/css">
@media all {
IE\:ValueTag {
behavior:url(value.htc);
}
}
</style>
</head>
<body>
<IE:ValueTag id="ddd" value="12345"></IE:ValueTag>
<button onclick="alert(ddd.value)">GetValue</button>
<button onclick="ddd.value='111'">PutValue</button>
</body>
</html>2. value.htc:
<public:component>
<public:property name="value" put="putValue" get="getValue"/><script language="javascript">
element.innerHTML = "<input type='text' id='xxx'>";
var sValue;
function putValue(argValue) {
sValue = argValue;
window.document.getElementById('xxx').value = sValue;
} function getValue() {
sValue = window.document.getElementById('xxx').value;
return sValue + "Len";
}
</script>
</public:component>