例如有一个webbutton 你可以在pageload write some code to add a new event to the button example: //---------------------- write in aspx <script> function dd() { var mDateString = window.showModalDialog("webpage.aspx",null,"dialogWidth:203px;dialogheight:238px;status:no;"); mDateString //the result } </script> //--------------end---------- //-----------in pageload()----------------- button1.attibute.add("onclick","dd()") //--------------in webpage.aspx-------- <script> window.returnValue = ReValue;// value need return; </script>
1。当该文件已经存在时,弹出对话框“该文件已经存在,是否覆盖?”,如果选择‘是’,则上传覆盖;否则,显示一个textbox重新输入文件名。
2。当该文件不存在时,正常上传不弹出对话框。(该方式也用于,重命名文件的上传)请各位高手指点,谢谢!
你可以在pageload write some code to add a new event to the button
example:
//---------------------- write in aspx
<script>
function dd()
{
var mDateString = window.showModalDialog("webpage.aspx",null,"dialogWidth:203px;dialogheight:238px;status:no;");
mDateString //the result
}
</script>
//--------------end----------
//-----------in pageload()-----------------
button1.attibute.add("onclick","dd()")
//--------------in webpage.aspx--------
<script>
window.returnValue = ReValue;// value need return;
</script>