2009-04-16 14 views
3

誰でも私のプロジェクトに助けてくれますか? JavaScriptのテキストフィールドの詳細をどのように呼び出すことができますか?Javascript変数渡し

function AddPushpin() 
{ 
    var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter()); 
    shape.SetTitle(**//it should be coming from a textfield//**); 
    shape.SetDescription('This is shape number '+pinid); 
    pinid++; 
    map.AddShape(shape); 
} 

答えて

4

のdocument.getElementById( 'myTextElementsId')。値

'shapeTitle' は、あなたがの値を必要とする要素のIDに対応する必要があります
3
<textfield id="shapeTitle"></textfield> 

---- // ----- 

document.getElementById('shapeTitle').value 

+0

これで写真をアップロードすることは可能でしょうか? これは同じコードですか? – bluestella

関連する問題