在java脚本函数中获得控制权 [英] get control in java script function

查看:60
本文介绍了在java脚本函数中获得控制权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是按钮



this is button

<input type="button"  önclick="javascript:test(document.getElementById('txtSkillKeyWord').value);" value="Check Duplicate" >



这是texbox


this is texbox

<input type="textbox" id="txtSkillKeyWord">





js function





js function

function test(control)
{
    var tmipwords = document.getElementById(control).value;
}





i想要document.getElementById中的texbox控件以及如何将控件置于此。



i want texbox control in document.getElementById and how can put control in this.

推荐答案

function test(control)
{
    var tmipwords = document.getElementById(control).value;
    alert(tmipwords);
}




<input type="button" önclick="test('txtSkillKeyWord');" value="Check Duplicate">;</input>




<input type="textbox" id="txtSkillKeyWord"></input>





享受.........


这篇关于在java脚本函数中获得控制权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆